Documentation
¶
Overview ¶
Package utils contains utility functions for the application.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigPath ¶
ConfigPath returns the path to the configuration file. It is located in the user's home directory.
func InitConfig ¶
InitConfig initializes the configuration file if it does not exist.
func UserPrompt ¶
UserPrompt processes the user's prompt. It reads files, gets MCP prompts, and replaces variables.
Types ¶
type AppConf ¶
type AppConf struct {
LLM LLM `yaml:"llm" json:"llm"`
LLMs map[string]LLM `yaml:"llms,omitempty" json:"llms,omitempty"`
Prompt *Prompt
}
AppConf defines the application's configuration.
func LoadConfig ¶
LoadConfig loads the configuration from the given file.
func (*AppConf) PickupModel ¶
func (c *AppConf) PickupModel()
PickupModel overrides the default model with the one provided by the user.
type LLM ¶
type LLM struct {
Gateway string `yaml:"gateway,omitempty" json:"gateway,omitempty"`
ApiKey string `yaml:"apiKey,omitempty" json:"apiKey,omitempty"`
Provider string `yaml:"provider" json:"provider"`
Model string `yaml:"model" json:"model"`
ReasonEffort string `yaml:"reasonEffort,omitempty" json:"reasonEffort,omitempty"`
}
LLM defines the configuration for a large language model.
Click to show internal directories.
Click to hide internal directories.