top_p
但不是两者。temperature
但不是两者。{
"model": "string",
"messages": [
{
"role": "string",
"content": "string"
}
],
"temperature": 0,
"top_p": 0,
"n": 0,
"stream": true,
"stop": "string",
"max_tokens": 0,
"presence_penalty": 0,
"frequency_penalty": 0,
"logit_bias": null,
"user": "string"
}
curl --location -g --request POST '{{BASE_URL}}/v1/chat/completions' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "string",
"messages": [
{
"role": "string",
"content": "string"
}
],
"temperature": 0,
"top_p": 0,
"n": 0,
"stream": true,
"stop": "string",
"max_tokens": 0,
"presence_penalty": 0,
"frequency_penalty": 0,
"logit_bias": null,
"user": "string"
}'
{
"id": "chatcmpl-123",
"object": "chat.completion",
"created": 1677652288,
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "\n\nHello there, how may I assist you today?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 9,
"completion_tokens": 12,
"total_tokens": 21
}
}