Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnthropicConfig ¶
type Config ¶
type Config struct { // LLM provider. Either `openai`, `anthropic` or `testing`. Provider string `toml:"provider,omitempty"` // The system message is dynamically added to each request in a conversation, // followed by the context string. SystemMessage string `toml:"system-message,multiline,omitempty"` // Additional .gitignore patterns for files that should be excluded from the // context sent to the LLM. Exclude []string `toml:"exclude"` // Maximum permitted length of the full context string (including XML tags). MaxContextLength int `toml:"max-context-length,omitempty"` // Files exceeding this limit will be ignored. This value should be defined // using SI notation, e.g. 20KB. MaxFileSize string `toml:"max-file-size,omitempty"` // Older conversations will be pruned from the database. -1 can be set to // ignore this option. MaxConversationHistory int `toml:"max-conversation-history,omitempty"` // Configuration for the `openai` LLM provider. Openai OpenaiConfig `toml:"openai,omitempty"` // Configuration for the `anthropic` LLM provider. Anthropic AnthropicConfig `toml:"anthropic,omitempty"` }
func ConfigFromToml ¶
func DefaultConfig ¶
func DefaultConfig() Config
func ResolveConfig ¶
ResolveConfig merges the default configuration with any overrides provided by the user in the `pal.toml` file.
It first creates a copy of the default configuration, and then applies any non-zero values from the user-provided overrides. This ensures that the returned configuration always contains a complete set of valid options, with the user’s overrides taking precedence.
The function also performs basic validation on the resolved configuration.
Returns the final, resolved configuration, or an error if any validation checks fail.
type OpenaiConfig ¶
Click to show internal directories.
Click to hide internal directories.