ChatChoice

@Serializable
data class ChatChoice(val index: Int, val message: ChatMessage, val finishReason: FinishReason? = null, val logprobs: Logprobs? = null)

A completion generated by OpenAI.

documentation

Constructors

Link copied to clipboard
constructor(index: Int, message: ChatMessage, finishReason: FinishReason? = null, logprobs: Logprobs? = null)

Properties

Link copied to clipboard
@SerialName(value = "finish_reason")
val finishReason: FinishReason? = null

The reason why OpenAI stopped generating.

Link copied to clipboard
@SerialName(value = "index")
val index: Int

Chat choice index.

Link copied to clipboard
@SerialName(value = "logprobs")
val logprobs: Logprobs? = null

Log probability information for the choice.

Link copied to clipboard
@SerialName(value = "message")
val message: ChatMessage

The generated chat message.