Canonical request struct for inference calls.
Normalizes the request format across all providers so that the adapter layer handles provider-specific serialization.
Content is always a list of typed blocks — no raw strings.
Content Blocks
%{role: :user, content: [
%{type: :text, text: "What's in this image?"},
%{type: :image_url, url: "https://..."},
%{type: :image_base64, media_type: "image/png", data: "iVBOR..."}
]}
Summary
Functions
Wraps a plain string as a single text content block.
Extracts all text from content blocks, joined by newline.
Types
@type message() :: %{role: atom(), content: [content_block()]}
@type t() :: %Arcanum.Intent{ context_length: pos_integer() | nil, max_tokens: pos_integer() | nil, messages: [message()], model: String.t(), temperature: float() | nil, tools: [tool()] | nil }
Functions
@spec text(String.t()) :: [content_block()]
Wraps a plain string as a single text content block.
@spec to_text([content_block()]) :: String.t()
Extracts all text from content blocks, joined by newline.