Skip to content

Commit 323ff14

Browse files
authored
docs: refactor model naming and update docs (#166)
- Update documentation to reflect the change from `gpt-3.5-turbo` to `gpt-4-turbo` and add mention of custom models - Remove references to `openai.model_name` in README and code, replacing with `openai.model` - Delete the `openai.model_name` configuration option from `config_list.go` - Remove the `model_name` flag binding from `config_set.go` Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
1 parent f4a0d7a commit 323ff14

3 files changed

Lines changed: 2 additions & 6 deletions

File tree

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ This will create a `.codegpt.yaml` file in your home directory ($HOME/.config/co
8383
* **openai.base_url**: replace the default base URL (`https://api.openai.com/v1`).
8484
* **openai.api_key**: generate API key from [openai platform page](https://platform.openai.com/account/api-keys).
8585
* **openai.org_id**: Identifier for this organization sometimes used in API requests. see [organization settings](https://platform.openai.com/account/org-settings). only for `openai` service.
86-
* **openai.model**: default model is `gpt-3.5-turbo`, you can change to `gpt-4` or [other available model list](https://github.com/appleboy/CodeGPT/blob/bf28f000463cfc6dfa2572df61e1b160c5c680f7/openai/openai.go#L18-L38).
86+
* **openai.model**: default model is `gpt-3.5-turbo`, you can change to `gpt-4-turbo` or other custom model (Groq or OpenRouter provider).
8787
* **openai.proxy**: http/https client proxy.
8888
* **openai.socks**: socks client proxy.
8989
* **openai.timeout**: default http timeout is `10s` (ten seconds).
@@ -92,7 +92,6 @@ This will create a `.codegpt.yaml` file in your home directory ($HOME/.config/co
9292
* **git.diff_unified**: generate diffs with `<n>` lines of context, default is `3`.
9393
* **git.exclude_list**: exclude file from `git diff` command.
9494
* **openai.provider**: default service provider is `openai`, you can change to `azure`.
95-
* **openai.model_name**: model deployment name (for azure).
9695
* **output.lang**: default language is `en` and available languages `zh-tw`, `zh-cn`, `ja`.
9796
* **openai.top_p**: default top_p is `1.0`. see reference [top_p](https://platform.openai.com/docs/api-reference/completions/create#completions/create-top_p).
9897
* **openai.frequency_penalty**: default frequency_penalty is `0.0`. see reference [frequency_penalty](https://platform.openai.com/docs/api-reference/completions/create#completions/create-frequency_penalty).
@@ -112,7 +111,7 @@ Update your config file.
112111
codegpt config set openai.provider azure
113112
codegpt config set openai.base_url https://xxxxxxxxx.openai.azure.com/
114113
codegpt config set openai.api_key xxxxxxxxxxxxxxxx
115-
codegpt config set openai.model_name xxxxx-gpt-35-turbo
114+
codegpt config set openai.model xxxxx-gpt-35-turbo
116115
```
117116

118117
### How to change to [Groq][30] API Service

cmd/config_list.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ var availableKeys = map[string]string{
3030
"openai.max_tokens": "the maximum number of tokens to generate in the chat completion.",
3131
"openai.temperature": "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.",
3232
"openai.provider": "service provider, only support 'openai' or 'azure'",
33-
"openai.model_name": "model deployment name for Azure cognitive service",
3433
"openai.skip_verify": "skip verify TLS certificate",
3534
"openai.headers": "custom headers for openai request",
3635
"openai.api_version": "openai api version",

cmd/config_set.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ func init() {
2929
configSetCmd.Flags().Float32P("frequency_penalty", "", 0.0, availableKeys["openai.frequency_penalty"])
3030
configSetCmd.Flags().Float32P("presence_penalty", "", 0.0, availableKeys["openai.presence_penalty"])
3131
configSetCmd.Flags().StringP("provider", "", "openai", availableKeys["openai.provider"])
32-
configSetCmd.Flags().StringP("model_name", "", "", availableKeys["openai.model_name"])
3332
configSetCmd.Flags().BoolP("skip_verify", "", false, availableKeys["openai.skip_verify"])
3433
configSetCmd.Flags().StringP("headers", "", "", availableKeys["openai.headers"])
3534
configSetCmd.Flags().StringP("api_version", "", "", availableKeys["openai.api_version"])
@@ -48,7 +47,6 @@ func init() {
4847
_ = viper.BindPFlag("git.template_file", configSetCmd.Flags().Lookup("template_file"))
4948
_ = viper.BindPFlag("git.template_string", configSetCmd.Flags().Lookup("template_string"))
5049
_ = viper.BindPFlag("openai.provider", configSetCmd.Flags().Lookup("provider"))
51-
_ = viper.BindPFlag("openai.model_name", configSetCmd.Flags().Lookup("model_name"))
5250
_ = viper.BindPFlag("openai.skip_verify", configSetCmd.Flags().Lookup("skip_verify"))
5351
_ = viper.BindPFlag("openai.headers", configSetCmd.Flags().Lookup("headers"))
5452
_ = viper.BindPFlag("openai.api_version", configSetCmd.Flags().Lookup("api_version"))

0 commit comments

Comments
 (0)