Documentation
¶
Overview ¶
Command advanced shows two lower-level controls layered on a normal request:
- Observe the exact serialized HTTP request with the OnRequest hook. It fires once per attempt, including retries.
- Force the model to call a tool with a protocol-specific ToolChoice, carried on ProtocolOptions and validated against the target protocol before sending.
The model comes from the built-in catalog. To reach an OpenAI-compatible endpoint that is not in the catalog, construct an llm.Model by hand instead and point its BaseURL at that endpoint (Provider still drives the API key lookup).
The API key is read from the provider's environment variable when StreamOptions.APIKey is empty:
DEEPSEEK_API_KEY=sk-... go run ./example/llm/advanced
Click to show internal directories.
Click to hide internal directories.