| Field | Type | Required | Description | Example |
|---|---|---|---|---|
finish_reason |
models.CompletionsChoiceFinishReason | ✔️ | Termination condition of the generation. stop means the API returned the full completions generated by the model without running into any limits. length means the generation exceeded max_tokens or the conversation exceeded the max context length. |
|
index |
int | ✔️ | The index of the choice in the list of generated choices. | 0 |
seed |
int | ✔️ | Random seed used for the generation. | 42 |
text |
str | ✔️ | Generated text output. | This is indeed a test |
tokens |
List[int] | ✔️ | Generated output tokens. | [ 128000, 2028, 374, 13118, 264, 1296 ] |
logprobs |
OptionalNullable[models.CompletionsLogprobs] | ➖ | N/A |