ChatChoiceChunk

@Serializable
class ChatChoiceChunk(val delta: ChatCompletionDelta, val finishReason: FinishReason?, val index: Long, val logprobs: LogProbs? = null)

One choice slice carried by a streamed ChatCompletionChunk.

Each chunk's choice delivers only the tokens produced since the previous chunk via delta. finishReason is null until the stream terminates on this choice.

Constructors

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

Properties

Link copied to clipboard

Incremental message fragment produced on this step.

Link copied to clipboard

Reason the model stopped generating tokens for this choice, or null if generation is still in progress.

Link copied to clipboard
val index: Long

Position of the choice in ChatCompletionChunk.choices.

Link copied to clipboard

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

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