-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add support for o1 models in openai and azure (#368)
* feat: add support for o1 models in openai and azure Add support for OpenAI o1 models by using `max_completion_tokens` instead of `max_tokens`. * **mods.go** - Add a check in the `startCompletionCmd` function to determine if the model is an o1 model and set the `max_completion_tokens` parameter accordingly. * **config.go** - Add a new field `MaxCompletionTokens` to the `Config` struct to store the value for the `max_completion_tokens` parameter. * **config_template.yml** - Add entries for `o1-preview` and `o1-mini` models under the `openai` section with `max-input-chars` set to 128000. - Add aliases for `o1-preview` and `o1-mini` models. - Add entries for `o1-preview` and `o1-mini` models under the `azure` section with `max-input-chars` set to 128000. - Add aliases for `o1-preview` and `o1-mini` models under the `azure` section. * feat: add support for o1 models in openai and azure Add support for OpenAI o1 models by using `max_completion_tokens` instead of `max_tokens`. * **mods.go** - Add a check in the `startCompletionCmd` function to determine if the model is an o1 model and set the `max_completion_tokens` parameter accordingly. * **config.go** - Add a new field `MaxCompletionTokens` to the `Config` struct to store the value for the `max_completion_tokens` parameter. * **config_template.yml** - Add entries for `o1-preview` and `o1-mini` models under the `openai` section with `max-input-chars` set to 128000. - Add aliases for `o1-preview` and `o1-mini` models. - Add entries for `o1-preview` and `o1-mini` models under the `azure` section with `max-input-chars` set to 128000. - Add aliases for `o1-preview` and `o1-mini` models under the `azure` section. * fix: adjust o1 model prefix check and remap system messages to user messages * fix: max tokens --------- Co-authored-by: Carlos Alexandro Becker <[email protected]>
- Loading branch information
1 parent
b52d41e
commit e5e4bdd
Showing
4 changed files
with
91 additions
and
49 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