class

OpenAI::ResponseLogProb

Inherits JSON::Serializable < Reference < Object

A logprob is the logarithmic probability that the model assigns to producing a particular token at a given position in the sequence. Less-negative (higher) logprob values indicate greater model confidence in that token choice.

Constructors

new(token : String = "", logprob : Float64 = 0.0, top_logprobs : Array(ResponseLogProbTopLogprobsItem) | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

logprob

The log probability of this token.

Source
logprob=(logprob : Float64)

The log probability of this token.

Source
token

A possible text token.

Source
token=(token : String)

A possible text token.

Source
top_logprobs

The log probability of the top 20 most likely tokens.

Source
top_logprobs=(top_logprobs : Array(ResponseLogProbTopLogprobsItem) | Nil)

The log probability of the top 20 most likely tokens.

Source