I'm struggling to find out which flags can be set through the configuration file -- a quick grep shows that apiKey probably can't be controlled through config files:
$ rg apiKey
helper.go
40: ApiKey: *apiKey,
205: resp, err := providers.NewRequest(codePrompt, structs.Params{ApiKey: *apiKey, ApiModel: *apiModel, Provider: *provider, Max_length: *max_length, Temperature: *temperature, Top_p: *top_p, Preprompt: *preprompt}, structs.ExtraOptions{})
285: resp, err := providers.NewRequest(shellPrompt, structs.Params{ApiKey: *apiKey, ApiModel: *apiModel, Provider: *provider, Max_length: *max_length, Temperature: *temperature, Top_p: *top_p, Preprompt: *preprompt}, structs.ExtraOptions{})
412: resp, err := providers.NewRequest(input, structs.Params{ApiKey: *apiKey, ApiModel: *apiModel, Provider: *provider, Max_length: *max_length, Temperature: *temperature, Top_p: *top_p, Preprompt: *preprompt}, structs.ExtraOptions{})
477: resp, err := providers.NewRequest(input, structs.Params{ApiKey: *apiKey, ApiModel: *apiModel, Provider: *provider, Max_length: *max_length, Temperature: *temperature, Top_p: *top_p, Preprompt: *preprompt}, structs.ExtraOptions{})
main.go
39:var apiKey *string
61: apiKey = flag.String("key", "", "Use personal API Key")
$ rg config
README.md
147:If you want to use a proxy, create `proxy.txt` file in the same directory from where you are executing the file and write your proxy configuration there.
165:Configuration file is usually located in `~/.config/tgpt` on GNU/Linux Systems and in `"Library/Application Support/tgpt"` on MacOS
client/client.go
24: proxyConfig, readErr := os.ReadFile("proxy.txt")
30: proxyAddress := strings.TrimSpace(string(proxyConfig))
Could you help me understand how to set default values of flags through the configuration file?
I'm struggling to find out which flags can be set through the configuration file -- a quick grep shows that
apiKey
probably can't be controlled through config files:Could you help me understand how to set default values of flags through the configuration file?
Thanks,