Repository navigation
Update owchatgptbase.py - #278
Closed
arturborja wants to merge 2 commits into
Closed
arturborja wants to merge 2 commits into
arturborja wants to merge 2 commits into
Conversation
Fix compatibility with OpenAI API models Corrigindo compatibilidade com modelos no OpenAI API
VesnaT
requested changes
Mar 31, 2025
Double quotes and spaces: Updated MODELS to ["gpt-3.5-turbo", "gpt-4", "o3-mini", "o1-mini", "gpt-4o-mini"] with " and spaces for consistency and readability. Encoding and library: Replaced hardcoded "o200k_base" with tiktoken.encoding_for_model(model) to match the encoding available for each model. Suggest tiktoken>=0.7.0 in requirements.txt for new encoding support. Parameters: Kept temperature=0 for old models where it’s supported, omitted it for new ones that may not, using it where possible.
Author
|
@VesnaT I’m looking forward to you accepting my pull request |
Contributor
|
Thank you for your contribution. However, we are afraid that the solution is outdated, and therefore we are closing this pull request. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix compatibility with OpenAI API models
Corrigindo compatibilidade com modelos no OpenAI API
Issue
Description of changes
Summary
This PR fixes compatibility issues with OpenAI API models by removing unsupported parameters.
Changes
systemrole frommessagesto support all models.temperatureis not explicitly set for models that do not allow custom values.Why?
Some models (e.g.,
o1-mini) do not support thesystemrole or customtemperaturevalues, causing errors.Includes