Omni.Content.ToolUse (Omni v1.2.1)

Copy Markdown View Source

A tool use content block representing the model's intent to invoke a tool.

Appears in assistant messages when the model decides to use a tool. The id is a provider-assigned identifier that links this block to its corresponding Omni.Content.ToolResult.

Summary

Types

t()

The model's request to invoke a named tool with given input.

Functions

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

Types

t()

@type t() :: %Omni.Content.ToolUse{
  id: String.t(),
  input: map(),
  name: String.t(),
  signature: String.t() | nil
}

The model's request to invoke a named tool with given input.

Functions

new(attrs)

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

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