ChatStreamChoice - Python SDK

ChatStreamChoice method reference

The Python SDK and docs are currently in beta. Report issues on GitHub.

Streaming completion choice chunk

Fields

FieldTypeRequiredDescriptionExample
deltacomponents.ChatStreamDelta✔️Delta changes in streaming response{"content": "Hello","role": "assistant"}
finish_reasonNullable[components.ChatFinishReasonEnum]✔️N/Astop
indexint✔️Choice index0
logprobsOptionalNullable[components.ChatTokenLogprobs]Log probabilities for the completion{"content": [{"bytes": null,"logprob": -0.612345,"token": " Hello","top_logprobs": []}
],
“refusal”: null<br />}