options
パラメータを使用して設定できます。この例では、使用可能なすべてのオプションを設定しますが、オプションを個別に設定し、上書きしたくないオプションを省略することもできます。curl --location --request POST 'http://localhost:11434/api/generate' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "llama2-7b",
"prompt": "string",
"stream": false,
"options": {
"num_keep": 1024,
"seed": 42,
"num_predict": 128,
"top_k": 40,
"top_p": 0.9,
"temperature": 0.8,
"repeat_penalty": 1.1,
"stop": [
"\n",
"。"
]
}
}'
{
"model": "llama3.2",
"created_at": "2023-08-04T19:22:45.499127Z",
"response": "The sky is blue because it is the color of the sky.",
"done": true,
"context": [1, 2, 3],
"total_duration": 4935886791,
"load_duration": 534986708,
"prompt_eval_count": 26,
"prompt_eval_duration": 107345000,
"eval_count": 237,
"eval_duration": 4289432000
}