ChatTokenLogProbabilityResult interface

A representation of the log probability information for a single content token, including a list of most likely tokens if 'top_logprobs' were requested.

Properties

bytes

A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be null if there is no bytes representation for the token.

logprob

The log probability of the message content token.

token

The message content token.

topLogprobs

The list of most likely tokens and their log probability information, as requested via 'top_logprobs'.

Property Details

bytes

A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be null if there is no bytes representation for the token.

bytes: null | number[]

Property Value

null | number[]

logprob

The log probability of the message content token.

logprob: number

Property Value

number

token

The message content token.

token: string

Property Value

string

topLogprobs

The list of most likely tokens and their log probability information, as requested via 'top_logprobs'.

topLogprobs: null | ChatTokenLogProbabilityInfo[]

Property Value