-
-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: set default maxTokens for OpenAI client to 300
- Add an `openai.max_tokens` flag to the `review` command with a default value of `300` - Add a `WithMaxTokens` function to the OpenAI client options, which sets the `maxTokens` field in the client configuration - Use the `openai.max_tokens` flag value in the `review` command when calling the OpenAI API - Remove the `MaxTokens` field initialization with a hardcoded value in the `CreateChatCompletion` and `CreateCompletion` functions of the OpenAI client - Change the `maxTokens` field of the OpenAI client configuration to be set by default to `300` in the `New` function of the OpenAI client - Add a constant `defaultMaxTokens` to the OpenAI client options file Signed-off-by: Bo-Yi.Wu <appleboy.tw@gmail.com>
- Loading branch information
Showing
5 changed files
with
50 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters