Arcana::AI::Chat::Response
Constructors
Parse from an OpenAI-compatible JSON response body.
Instance methods
DEPRECATED Use usage.cache_write + usage.cache_write_1h, the same for every provider, and #cost for what the call cost. Removed in arcana-ai 0.6.0.
DEPRECATED Set #usage. Removed in arcana-ai 0.6.0.
DEPRECATED Use usage.cache_read, the same for every provider, and #cost for what the call cost. Removed in arcana-ai 0.6.0.
DEPRECATED Set #usage. Removed in arcana-ai 0.6.0.
DEPRECATED Use usage.output (reasoning included), the same for every provider, and #cost for what the call cost. Removed in arcana-ai 0.6.0.
DEPRECATED Set #usage. Removed in arcana-ai 0.6.0.
What this call cost; see Pricing. at is when it was made.
DEPRECATED Use usage.prompt (the whole prompt) or usage.input (uncached input), the same for every provider, and #cost for what the call cost. Removed in arcana-ai 0.6.0.
DEPRECATED Use usage.reasoning, the same for every provider, and #cost for what the call cost. Removed in arcana-ai 0.6.0.
DEPRECATED Set #usage. Removed in arcana-ai 0.6.0.
Retries the call needed (rate limits, server or network errors)
and the time spent waiting between tries. See RetryPolicy.
Retries the call needed (rate limits, server or network errors)
and the time spent waiting between tries. See RetryPolicy.
Server-side tool results (e.g. web_search results).
The raw reasoning text if the provider surfaces it (Anthropic extended thinking, Gemini with includeThoughts). OpenAI o-series never surfaces the reasoning itself, so this stays nil for OpenAI even when reasoning ran.
The raw reasoning text if the provider surfaces it (Anthropic extended thinking, Gemini with includeThoughts). OpenAI o-series never surfaces the reasoning itself, so this stays nil for OpenAI even when reasoning ran.
Find the first tool call matching a given function name.
What the call used, in the same billing categories for every
provider (see Usage); nil when the provider reported none.
Pricing prices it.
What the call used, in the same billing categories for every
provider (see Usage); nil when the provider reported none.
Pricing prices it.
This response with the retry record of the call that produced it.