Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
kardolus
GitHub Repository: kardolus/chatgpt-cli
Path: blob/main/config/config.go
3447 views
1
package config
2
3
type Config struct {
4
Name string `yaml:"name"`
5
APIKey string `yaml:"api_key"`
6
APIKeyFile string `yaml:"api_key_file"`
7
Model string `yaml:"model"`
8
MaxTokens int `yaml:"max_tokens"`
9
ContextWindow int `yaml:"context_window"`
10
Role string `yaml:"role"`
11
Temperature float64 `yaml:"temperature"`
12
TopP float64 `yaml:"top_p"`
13
FrequencyPenalty float64 `yaml:"frequency_penalty"`
14
PresencePenalty float64 `yaml:"presence_penalty"`
15
Thread string `yaml:"thread"`
16
OmitHistory bool `yaml:"omit_history"`
17
URL string `yaml:"url"`
18
CompletionsPath string `yaml:"completions_path"`
19
ModelsPath string `yaml:"models_path"`
20
ResponsesPath string `yaml:"responses_path"`
21
SpeechPath string `yaml:"speech_path"`
22
ImageGenerationsPath string `yaml:"image_generations_path"`
23
ImageEditsPath string `yaml:"image_edits_path"`
24
TranscriptionsPath string `yaml:"transcriptions_path"`
25
AuthHeader string `yaml:"auth_header"`
26
AuthTokenPrefix string `yaml:"auth_token_prefix"`
27
CommandPrompt string `yaml:"command_prompt"`
28
CommandPromptColor string `yaml:"command_prompt_color"`
29
OutputPrompt string `yaml:"output_prompt"`
30
OutputPromptColor string `yaml:"output_prompt_color"`
31
AutoCreateNewThread bool `yaml:"auto_create_new_thread"`
32
AutoShellTitle bool `yaml:"auto_shell_title"`
33
TrackTokenUsage bool `yaml:"track_token_usage"`
34
SkipTLSVerify bool `yaml:"skip_tls_verify"`
35
Multiline bool `yaml:"multiline"`
36
Web bool `yaml:"web"`
37
WebContextSize string `yaml:"web_context_size"`
38
Seed int `yaml:"seed"`
39
Effort string `yaml:"effort"`
40
Voice string `yaml:"voice"`
41
UserAgent string `yaml:"user_agent"`
42
CustomHeaders map[string]string `yaml:"custom_headers"`
43
Agent AgentConfig `yaml:"agent"`
44
}
45
46
type AgentConfig struct {
47
Mode string `yaml:"mode"`
48
WorkDir string `yaml:"work_dir"`
49
DryRun bool `yaml:"dry_run"`
50
51
// Budgets / guardrails (0 = unlimited)
52
MaxSteps int `yaml:"max_steps"`
53
MaxIterations int `yaml:"max_iterations"`
54
MaxWallTime int `yaml:"max_wall_time"`
55
MaxShellCalls int `yaml:"max_shell_calls"`
56
MaxLLMCalls int `yaml:"max_llm_calls"`
57
MaxFileOps int `yaml:"max_file_ops"`
58
MaxLLMTokens int `yaml:"max_llm_tokens"`
59
60
// Safety/policy
61
AllowedTools []string `yaml:"allowed_tools"`
62
DeniedShellCommands []string `yaml:"denied_shell_commands"`
63
AllowedFileOps []string `yaml:"allowed_file_ops"`
64
RestrictFilesToWorkDir bool `yaml:"restrict_files_to_work_dir"`
65
66
// Logging / artifacts
67
WritePlanJSON bool `yaml:"write_plan_json"`
68
PlanJSONPath string `yaml:"plan_json_path"`
69
}
70
71