Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace Choice

Represents a single instance of generated text.

Properties

finishReason

finishReason: string

The reason why the model stopped generating tokens.

Stops if the model hits a natural stop point or a provided stop sequence. Returns the length if the tokens reach the specified maximum number of tokens.

index

index: number

The index of the generated text. Note: Numbers greater than Number.MAX_SAFE_INTEGER will result in rounding issues.

Optional logprobs

logprobs: model.Logprobs

text

text: string

The generated text.

Functions

getDeserializedJsonObj

  • getDeserializedJsonObj(obj: Choice): object

getJsonObj

  • getJsonObj(obj: Choice): object