View Source ExOpenAI.Components.CompletionUsage (ex_openai.ex v1.8.0)

Schema representing a CompletionUsage within the OpenAI API

Summary

Types

@type t() :: %ExOpenAI.Components.CompletionUsage{
  completion_tokens: integer(),
  completion_tokens_details:
    %{
      accepted_prediction_tokens: integer(),
      audio_tokens: integer(),
      reasoning_tokens: integer(),
      rejected_prediction_tokens: integer()
    }
    | nil,
  prompt_tokens: integer(),
  prompt_tokens_details:
    %{audio_tokens: integer(), cached_tokens: integer()} | nil,
  total_tokens: integer()
}