GenAI.Tool.Result (GenAI Core v0.3.4)

Copy Markdown

Normalized outcome of a tool execution.

Summary

Functions

Converts a result to the existing provider-neutral tool response message.

Types

t()

@type t() :: %GenAI.Tool.Result{
  call_id: String.t() | nil,
  content: term(),
  duration: non_neg_integer(),
  error: term(),
  metadata: map(),
  name: String.t(),
  source: String.t() | nil,
  status: :ok | :error
}

Functions

to_message(result)

@spec to_message(t()) :: GenAI.Message.ToolResponse.t()

Converts a result to the existing provider-neutral tool response message.