Helicone · Schema

ChatCompletion.Choice

AI GatewaysAI MonitoringGatewaysLLM ObservabilityLLM RoutingPrompt Management

Properties

Name Type Description
finish_reason string The reason the model stopped generating tokens. This will be `stop` if the model hit a natural stop point or a provided stop sequence, `length` if the maximum number of tokens specified in the request
index number The index of the choice in the list of choices.
logprobs object Log probability information for the choice.
message object A chat completion message generated by the model.
View JSON Schema on GitHub

JSON Schema

helicone-chatcompletionchoice-schema.json Raw ↑
{
  "$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
}