Arcanum.Response (arcanum v0.1.0)

Copy Markdown View Source

Canonical response struct from inference calls.

Normalizes provider responses into a uniform shape so that callers don't need to handle provider-specific formats.

Summary

Types

t()

@type t() :: %Arcanum.Response{
  content: String.t() | nil,
  finish_reason: String.t() | nil,
  thinking: String.t() | nil,
  tool_calls: [tool_call()] | nil,
  usage: usage() | nil
}

tool_call()

@type tool_call() :: %{
  id: String.t(),
  function: %{name: String.t(), arguments: String.t()}
}

usage()

@type usage() :: %{
  prompt_tokens: non_neg_integer(),
  completion_tokens: non_neg_integer(),
  total_tokens: non_neg_integer()
}