CrucibleIR.Backend.Prompt (CrucibleIR v0.3.0)
View SourceUniversal prompt IR for backend requests.
Supports chat-style messages, tool calling, and multimodal content in a provider-agnostic shape.
Fields
:messages- Message history:system- System prompt (optional):tools- Tool definitions (optional):tool_choice- Tool selection directive:options- Backend options:request_id- Request correlation ID:trace_id- Trace correlation ID:metadata- Additional metadata
Examples
iex> %CrucibleIR.Backend.Prompt{messages: [%{role: :user, content: "Hello"}]}
Summary
Types
@type content_part() :: %{type: :text, text: String.t()} | %{type: :image, url: String.t(), media_type: String.t() | nil} | %{type: :image, base64: String.t(), media_type: String.t()} | %{type: :audio, url: String.t(), format: String.t()} | %{type: :tool_result, tool_call_id: String.t(), content: String.t()}
@type role() :: :system | :user | :assistant | :tool
@type t() :: %CrucibleIR.Backend.Prompt{ messages: [message()], metadata: map(), options: CrucibleIR.Backend.Options.t(), request_id: String.t() | nil, system: String.t() | nil, tool_choice: tool_choice() | nil, tools: [tool()] | nil, trace_id: String.t() | nil }
@type tool() :: map()
@type tool_choice() :: :auto | :none | :required | %{name: String.t()}