Choice

@Serializable
data class Choice(val text: String, val index: Int, val logprobs: Logprobs? = null, val finishReason: FinishReason? = null)

A completion generated by GPT-3.

documentation

Constructors

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

Properties

Link copied to clipboard

The reason the model stopped generating tokens. This will be FinishReason.Stop if the model hit a natural stop point or a provided stop sequence, or FinishReason.Length if the maximum number of tokens specified in the request was reached.

Link copied to clipboard
val index: Int

This index of this completion in the returned list.

Link copied to clipboard
val logprobs: Logprobs? = null

The log probabilities of the chosen tokens and the top CompletionRequest.logprobs tokens.

Link copied to clipboard

The generated text. Will include the prompt if CompletionRequest.echo is true