Documentation
¶
Index ¶
- Variables
- func ApplyConfig(config *FullConfig, token *string, maxRound *int, baseUrl *string, ...) error
- func Main(args []string, opts Options) error
- type ChatHandler
- type ChatOptions
- func (c ChatOptions) MCPServers() []string
- func (c ChatOptions) MaxRound() int
- func (c ChatOptions) NoCache() bool
- func (c ChatOptions) SystemPrompt() string
- func (c ChatOptions) ToolBuiltins() []string
- func (c ChatOptions) ToolDefaultCwd() string
- func (c ChatOptions) ToolFiles() []string
- func (c ChatOptions) ToolJSONs() []string
- type Config
- type FullConfig
- type Number
- type Options
- type ResolvedOptions
- type StringOrList
- type ToolInfo
- type ToolInfoMapping
Constants ¶
This section is empty.
Variables ¶
View Source
var ConfigDef string
View Source
var ExampleConfig string
Functions ¶
func ApplyConfig ¶ added in v0.0.12
func ApplyConfig(config *FullConfig, token *string, maxRound *int, baseUrl *string, model *string, systemPrompt *string, tools *[]string, toolCustomFiles *[]string, toolCustomJSONs *[]string, toolDefaultCwd *string, recordFile *string, noCache *bool, showUsage *bool, ignoreDuplicateMsg *bool, logRequest *bool, logChatFlag **bool, verbose *bool, mcpServers *[]string) error
ApplyConfig applies configuration values to the provided variables, giving precedence to command line arguments
Types ¶
type ChatHandler ¶
func (*ChatHandler) Handle ¶
func (c *ChatHandler) Handle(model string, baseUrl string, token string, msg string, opts ChatOptions) error
type ChatOptions ¶
type ChatOptions struct {
// contains filtered or unexported fields
}
func (ChatOptions) MCPServers ¶ added in v0.0.17
func (c ChatOptions) MCPServers() []string
func (ChatOptions) MaxRound ¶ added in v0.0.17
func (c ChatOptions) MaxRound() int
func (ChatOptions) NoCache ¶ added in v0.0.17
func (c ChatOptions) NoCache() bool
func (ChatOptions) SystemPrompt ¶ added in v0.0.17
func (c ChatOptions) SystemPrompt() string
Getter methods for ChatOptions to allow external access
func (ChatOptions) ToolBuiltins ¶ added in v0.0.17
func (c ChatOptions) ToolBuiltins() []string
func (ChatOptions) ToolDefaultCwd ¶ added in v0.0.17
func (c ChatOptions) ToolDefaultCwd() string
func (ChatOptions) ToolFiles ¶ added in v0.0.17
func (c ChatOptions) ToolFiles() []string
func (ChatOptions) ToolJSONs ¶ added in v0.0.17
func (c ChatOptions) ToolJSONs() []string
type Config ¶ added in v0.0.12
type Config struct {
types.Config // Embed the base config
ToolCustomJSONs []*tools.UnifiedTool `json:"tool_custom_jsons,omitempty"` // Tool-specific field that needs UnifiedTool
}
Config represents the configuration structure that can be loaded from a file
type FullConfig ¶ added in v0.0.13
type FullConfig struct {
Config
RecordFile string `json:"record_file,omitempty"`
NoCache bool `json:"no_cache,omitempty"`
ShowUsage bool `json:"show_usage,omitempty"`
IgnoreDuplicateMsg bool `json:"ignore_duplicate_msg,omitempty"`
LogRequest bool `json:"log_request,omitempty"`
LogChat *bool `json:"log_chat,omitempty"`
Verbose bool `json:"verbose,omitempty"`
}
func LoadConfig ¶ added in v0.0.12
func LoadConfig(configFile string) (*FullConfig, error)
LoadConfig loads configuration from a JSON file
type ResolvedOptions ¶ added in v0.0.8
func ResolveEnvOptions ¶ added in v0.0.8
type StringOrList ¶ added in v0.0.12
type StringOrList = types.StringOrList
Legacy type alias for compatibility
type ToolInfo ¶ added in v0.0.8
type ToolInfoMapping ¶ added in v0.0.8
Source Files
¶
Click to show internal directories.
Click to hide internal directories.