ChatChoice

@Serializable
class ChatChoice(val finishReason: FinishReason, val index: Long, val message: ChatCompletionMessage, val logprobs: LogProbs? = null)

One completion alternative returned inside a ChatCompletion.

A ChatCompletion may contain several choices when the request asked the model to produce multiple candidates; each choice has its own message and finish reason.

Constructors

Link copied to clipboard
constructor(finishReason: FinishReason, index: Long, message: ChatCompletionMessage, logprobs: LogProbs? = null)

Properties

Link copied to clipboard

Reason the model stopped generating tokens for this choice.

Link copied to clipboard
val index: Long

Position of the choice in ChatCompletion.choices.

Link copied to clipboard

Log-probability information for the generated tokens, if requested via the logprobs parameter.

Link copied to clipboard

Assistant message produced by the model.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String