LlmToolkit.Tool.Call (llm_toolkit v0.1.0)

Copy Markdown View Source

Represents an LLM's request to invoke a tool.

When a provider responds with one or more tool call requests, each is parsed into a Call struct by the provider codec.

Fields

  • id - Provider-assigned call identifier (string or nil)
  • name - The tool name the LLM wants to invoke
  • arguments - Parsed argument map (always a map, never a JSON string)

Summary

Functions

Creates a new Call struct from a map of attributes.

Types

t()

@type t() :: %LlmToolkit.Tool.Call{
  arguments: map(),
  id: String.t() | nil,
  name: String.t()
}

Functions

new(attrs)

@spec new(map()) :: {:ok, t()} | {:error, term()}

Creates a new Call struct from a map of attributes.