tools

command
v0.5.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Command tools lets an agent run a typed tool loop for a weather question.

Unlike the llm/tools example, this program does not hand-write the loop. The agent streams a turn, executes get_weather when the model asks for it, appends the tool result, and keeps going until the model gives a final answer.

The API key is read from the provider's environment variable when StreamOptions.APIKey is empty:

DEEPSEEK_API_KEY=sk-... go run ./example/agent/tools

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL