View Source ExOpenAI.Components.ResponseLogProb (ex_openai.ex v2.0.0-beta2)

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.

Fields

  • :logprob - required - number()
    The log probability of this token.

  • :token - required - String.t()
    A possible text token.

  • :top_logprobs - optional - [{:%{}, [], [{{:optional, [], [:logprob]}, {:number, [], []}}, {{:optional, [], [:token]}, {{:., [], [{:__aliases__, [alias: false], [:String]}, :t]}, [], []}}]}]
    The log probability of the top 20 most likely tokens.

Summary

Types

@type t() :: %ExOpenAI.Components.ResponseLogProb{
  logprob: number(),
  token: String.t(),
  top_logprobs:
    [%{optional(:logprob) => number(), optional(:token) => String.t()}] | nil
}