Backplane.AiProtocol.ContentBlock (backplane_ai_protocol v0.7.0)

Copy Markdown

Typed, ordered content.

Opaque reasoning and provider state are preserved as provenance-tagged values; they are never converted into display text.

Summary

Types

kind()

@type kind() :: :text | :image | :reasoning | :tool_call | :refusal | :provider_state

t()

@type t() :: %Backplane.AiProtocol.ContentBlock{
  data: term() | nil,
  extensions: map(),
  reason: String.t() | nil,
  state: map() | nil,
  text: String.t() | nil,
  tool_call: Backplane.AiProtocol.ToolCall.t() | nil,
  type: kind()
}

Functions

new(block)

@spec new(map()) :: {:ok, t()} | {:error, Backplane.AiProtocol.Error.t()}