{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "#/components/schemas/ChatCompletion.Choice", "title": "ChatCompletion.Choice", "properties": { "finish_reason": { "type": "string", "enum": [ "stop", "length", "tool_calls", "content_filter", "function_call" ], "description": "The reason the model stopped generating tokens. This will be `stop` if the model\nhit a natural stop point or a provided stop sequence, `length` if the maximum\nnumber of tokens specified in the request was reached, `content_filter` if\ncontent was omitted due to a flag from our content filters, `tool_calls` if the\nmodel called a tool, or `function_call` (deprecated) if the model called a\nfunction." }, "index": { "type": "number", "format": "double", "description": "The index of the choice in the list of choices." }, "logprobs": { "allOf": [ { "$ref": "#/components/schemas/ChatCompletion.Choice.Logprobs" } ], "nullable": true, "description": "Log probability information for the choice." }, "message": { "$ref": "#/components/schemas/ChatCompletionMessage", "description": "A chat completion message generated by the model." } }, "required": [ "finish_reason", "index", "logprobs", "message" ], "type": "object", "additionalProperties": false }