Jido.AI.Reasoning.ReAct.PendingToolCall (Jido AI v2.1.0)

View Source

Tracks a tool call in the ReAct runtime.

Summary

Functions

Marks a pending call as completed with result, attempts, and duration metadata.

Builds a normalized pending tool call from an LLM tool call map.

Returns the Zoi schema used to validate pending tool call entries.

Types

t()

@type t() :: %Jido.AI.Reasoning.ReAct.PendingToolCall{
  arguments: map(),
  attempts: integer(),
  duration_ms: nil | integer(),
  id: binary(),
  name: binary(),
  result: nil | any(),
  status: atom()
}

Functions

complete(call, result, attempts, duration_ms)

@spec complete(
  t(),
  {:ok, term()} | {:error, term()},
  non_neg_integer(),
  non_neg_integer()
) :: t()

Marks a pending call as completed with result, attempts, and duration metadata.

from_tool_call(tool_call)

@spec from_tool_call(map()) :: t()

Builds a normalized pending tool call from an LLM tool call map.

schema()

@spec schema() :: term()

Returns the Zoi schema used to validate pending tool call entries.