mirror of
https://github.com/wassname/openrouter-python-sdk-retry-errors.git
synced 2026-07-29 11:23:49 +08:00
15 lines
3.5 KiB
Plaintext
15 lines
3.5 KiB
Plaintext
---
|
|
title: "ChatChoice"
|
|
---
|
|
|
|
Chat completion choice
|
|
|
|
|
|
## Fields
|
|
|
|
| Field | Type | Required | Description | Example |
|
|
| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ |
|
|
| `finish_reason` | [Nullable[components.ChatFinishReasonEnum]](../components/chatfinishreasonenum.mdx) | :heavy_check_mark: | N/A | stop |
|
|
| `index` | *int* | :heavy_check_mark: | Choice index | 0 |
|
|
| `logprobs` | [OptionalNullable[components.ChatTokenLogprobs]](../components/chattokenlogprobs.mdx) | :heavy_minus_sign: | Log probabilities for the completion | \{<br/>"content": [<br/>\{<br/>"bytes": null,<br/>"logprob": -0.612345,<br/>"token": " Hello",<br/>"top_logprobs": []<br/>}<br/>],<br/>"refusal": null<br/>} |
|
|
| `message` | [components.ChatAssistantMessage](../components/chatassistantmessage.mdx) | :heavy_check_mark: | Assistant message for requests and responses | \{<br/>"content": "What is the capital of France?",<br/>"role": "user"<br/>} | |