New

implement LLMRequest.AppendTools (#27)

Hyang-Ah Hana Kim
2 months ago

Commit: d2516c0

Date: July 11, 2025 at 1:11 PM

  • fix a bug in NewInvocationContext

Forgot to set the Agent field (agent.go)

And minor cleanups and typo fixes in other files.

  • implement LLMRequest.AppendTools

Tools are added to the LLMRequest's Tools dictionary - so they can be looked up

while postprocessing LLMResponse and used to detect duplicate tool registration.

Move the function declaration registration logic from tool.FunctionTool.ProcessRequest

LLMRequest.AppendTools. Now ProcessRequest simply registers it to LLMRequest

by calling LLMRequest.AppendTools.

The new internal/itype package defines internal-only interfaces and types.

itype.FunctionTool: FunctionTool that returns FunctionDeclaration.

The tool.FunctionTool implements both adk.Tool and itype.FunctionTool.