Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultMaxTokens = 1024
DefaultMaxTokens is used when MaxTokens is 0 and the provider requires it (e.g. Anthropic).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LLMConfig ¶
type LLMConfig struct {
APIKey string
Model string
BaseURL string
Logger logger.Logger
LogLevel string
}
func BuildConfig ¶
BuildConfig builds LLMConfig from options. Defaults when not set:
- LogLevel: "error"
- Logger: stderr slog logger at LogLevel
Sampling (Temperature, MaxTokens, TopP, TopK) is per-agent—use agent.WithTemperature etc.
type Option ¶
type Option func(*LLMConfig)
func WithAPIKey ¶
func WithBaseURL ¶
func WithLogLevel ¶
func WithLogger ¶
Click to show internal directories.
Click to hide internal directories.