Backplane.AiProtocol.ContentBlock (backplane_ai_protocol v1.7.2)

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(attrs, opts \\ [])

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