Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for max_completion_tokens property #168

Merged
merged 2 commits into from
Nov 6, 2024
Merged

Conversation

marcominerva
Copy link
Owner

This pull request includes updates to support new o1 series models, deprecate the MaxTokens property in favor of MaxCompletionTokens, and update various package dependencies. The most important changes are summarized below:

Support for o1 Series Models:

  • Added o1-preview and o1-mini models to the list of available models in README.md and OpenAIChatGptModels.cs. [1] [2]
  • Updated ChatGptParameters and ChatGptRequest classes to include the new MaxCompletionTokens property, with deprecation notes for MaxTokens. [1] [2]

Code Updates:

  • Modified CreateChatGptRequest method in ChatGptClient.cs to handle the conditional use of MaxCompletionTokens for o1 series models. [1] [2] [3]

Documentation Updates:

  • Added comments in README.md and appsettings.json files to explain the use of MaxCompletionTokens for o1 series models. [1] [2] [3] [4] [5]

Dependency Updates:

  • Updated package versions in various project files (ChatGptApi.csproj, ChatGptBlazor.Wasm.csproj, Directory.Build.props). [1] [2] [3]

Closes #167

Added `MaxCompletionTokens` property to `appsettings.json`, `ChatGptParameters.cs`, and `ChatGptRequest.cs`. Modified `ChatGptClient.cs` to handle `MaxCompletionTokens` and set `MaxTokens` to null if it is set.
Updated README.md to list new models (`o1-preview` and `o1-mini`) and revised configuration examples to use `MaxCompletionTokens`. Updated appsettings.json to reflect the new `MaxCompletionTokens` property in configuration examples. Added constants for new models in OpenAIChatGptModels.cs with descriptions and token support details.
@marcominerva marcominerva merged commit 76f1939 into master Nov 6, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for max_completion_tokens property
1 participant