Chat Choice
The OpenAI API returns a list of ChatChoice
. Each choice has a generated message (ChatChoice.message) and a finish reason (ChatChoice.finishReason). For most use cases, you only need the generated message.
By default, only 1 ChatChoice is generated (since ChatRequest.n == 1). When you increase n
, more options are generated. The more options you generate, the more tokens you use. In general, it is best to ONLY generate 1 response, and to let the user regenerate the response.
See also
Properties
Link copied to clipboard
The reason the bot stopped generating tokens.
Link copied to clipboard
The index in the array... 0 if ChatRequest.n=1.
Link copied to clipboard
The generated text.