ChatCompletionChoice
indexIndex (integer)required
message objectrequired
roleRole (string)required
Possible values: [system, user, assistant, developer, tool, function]
content object
anyOf
- string
- ChatCompletionMessageText
- ChatCompletionMessageImageUrl
- object[]
- null
string
reasoning_content object
anyOf
- string
- null
string
name object
anyOf
- string
- null
string
tool_calls object
anyOf
- object[]
- null
Array [
idId (string)required
index object
anyOf
- integer
- null
integer
typeType (string)
Constant value:
functionDefault value:
functionfunction objectrequired
idId (string)
nameName (string)required
argumentsArguments (string)required
]
tool_call_id object
anyOf
- string
- null
string
function_call object
anyOf
- object
- null
object
logprobs object
anyOf
- Logprobs
- null
content object
anyOf
- object[]
- null
Array [
tokenToken (string)required
logprobLogprob (number)required
bytes object
anyOf
- integer[]
- null
Array [
integer
]
top_logprobs object[]required
Array [
tokenToken (string)required
logprobLogprob (number)required
bytes object
anyOf
- integer[]
- null
Array [
integer
]
]
]
finish_reason object
anyOf
- string
- null
string
Possible values: [stop, length, tool_calls, content_filter, function_call, error]
ChatCompletionChoice
{
"index": 0,
"message": {
"role": "system",
"content": "string",
"reasoning_content": "string",
"name": "string",
"tool_calls": [
{
"id": "string",
"index": 0,
"type": "function",
"function": {
"id": "string",
"name": "string",
"arguments": "string"
}
}
],
"tool_call_id": "string",
"function_call": {}
},
"logprobs": {
"content": [
{
"token": "string",
"logprob": 0,
"bytes": [
0
],
"top_logprobs": [
{
"token": "string",
"logprob": 0,
"bytes": [
0
]
}
]
}
]
},
"finish_reason": "stop"
}