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
Click to show internal directories.
Click to hide internal directories.