Skip to main content
Version: 21 R3

OpenAIChoice

The OpenAIChoice class represents a choice made by the OpenAI API response, containing information about the choice, including its finished reason, index, message, and an optional partial message for streaming responses.

Properties​

PropertyTypeDescription
message OpenAIMessageThe message associated with this choice.
deltaOpenAIMessageA partial message used for streaming responses.(stream: True.md)
finish_reasonTextThe reason the choice finished (e.g., "stop").
indexIntegerThe index of the choice in the response.