LlmToolkit.Tool.Result (llm_toolkit v0.1.0)

Copy Markdown View Source

The result of executing a tool call.

After the resolver executes a LlmToolkit.Tool.Call, the outcome is wrapped in a Result struct before being fed back to the LLM.

Fields

  • tool_call_id - Matches the originating Call.id (string or nil)
  • name - The tool name that was executed
  • content - String content returned by the tool

Summary

Functions

Creates a new Result struct from a map of attributes.

Types

t()

@type t() :: %LlmToolkit.Tool.Result{
  content: String.t(),
  name: String.t(),
  tool_call_id: String.t() | nil
}

Functions

new(attrs)

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

Creates a new Result struct from a map of attributes.