Omni.Content.ToolResult (Omni v1.2.1)

Copy Markdown View Source

A tool result content block representing the output of a tool invocation.

Appears in user messages to provide the result of a preceding Omni.Content.ToolUse. The tool_use_id links back to the originating tool use block. Content is restricted to Text and Attachment blocks (image attachments are only supported by some providers).

Summary

Types

Allowed content types within a tool result.

t()

Output of a tool invocation, linked to its originating ToolUse by ID.

Functions

Creates a new tool result content block from a keyword list or map.

Types

content()

Allowed content types within a tool result.

t()

@type t() :: %Omni.Content.ToolResult{
  content: [content()],
  is_error: boolean(),
  name: String.t(),
  tool_use_id: String.t()
}

Output of a tool invocation, linked to its originating ToolUse by ID.

Functions

new(attrs)

@spec new(Enumerable.t()) :: t()

Creates a new tool result content block from a keyword list or map.

String content is wrapped in a Text block. nil content becomes [].