Backplane.AiProtocol.Message (backplane_ai_protocol v1.7.2)

Copy Markdown

One ordered protocol item with preserved role and content order.

Summary

Types

role()

@type role() :: :system | :developer | :user | :assistant | :tool

status()

@type status() :: :success | :error | nil

t()

@type t() :: %Backplane.AiProtocol.Message{
  content: [Backplane.AiProtocol.ContentBlock.t()],
  extensions: map(),
  role: role(),
  status: status(),
  tool_call_id: String.t() | nil
}

Functions

new(attrs, opts \\ [])

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