advanced

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: 5 Imported by: 0

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

Jump to

Keyboard shortcuts

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