LLM.Usage (LLM v0.1.0)

Copy Markdown View Source

Token usage information.

Summary

Functions

Create a usage struct, computing total_tokens if not provided.

Types

t()

@type t() :: %LLM.Usage{
  input_tokens: non_neg_integer() | nil,
  output_tokens: non_neg_integer() | nil,
  total_tokens: non_neg_integer() | nil
}

Functions

new(attrs)

Create a usage struct, computing total_tokens if not provided.