Mnemosyne.LLM.Response (mnemosyne v0.4.0)

Copy Markdown View Source

Struct returned by LLM chat completions.

Summary

Types

t()

Optional provider-reported usage data.

Types

t()

@type t() :: %Mnemosyne.LLM.Response{
  content: term(),
  model: String.t(),
  usage: usage()
}

usage()

@type usage() :: map()

Optional provider-reported usage data.

Recognized keys are :input_tokens, :output_tokens, :cache_creation_input_tokens, :cache_read_input_tokens, :reasoning_tokens, :input_cost, :output_cost, :cache_read_cost, :cache_write_cost, :reasoning_cost, :total_cost, and :currency. All keys are optional; adapters may include additional keys.