LlmCall.Response (llm_call v0.1.0)

Copy Markdown View Source

A provider-neutral completion response.

content is a list of content parts, never provider-specific choices or output items. raw is a provider snapshot, retained only when LlmCall.Config.capture_raw asks for it, and is never a second response model.

Summary

Functions

All text parts joined in order.

The tool calls in this response, in order.

Types

t()

@type t() :: %LlmCall.Response{
  content: [LlmCall.Content.part()],
  id: String.t() | nil,
  model: String.t() | nil,
  raw: map() | nil,
  stop_reason: LlmCall.stop_reason(),
  usage: LlmCall.Usage.t() | nil
}

Functions

text(response)

@spec text(t()) :: String.t()

All text parts joined in order.

tool_calls(response)

@spec tool_calls(t()) :: [LlmCall.ToolCall.t()]

The tool calls in this response, in order.