fix(bug): update model handling in OpenAI and AzureOpenAI configurations#1178
Merged
chakravarthik27 merged 1 commit intorelease/2.6.0from Feb 25, 2025
Conversation
Prikshit7766
approved these changes
Feb 25, 2025
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.
This pull request includes several updates to the
langtest/augmentation/utils.pyfile to enhance model configuration and validation logic. The most important changes include switching fromvalidatortofield_validator, adding a newmodelfield to configuration classes, and dynamically setting the model name in template generation functions.Updates to model configuration and validation:
langtest/augmentation/utils.py: Changed import frompydantic.v1topydanticand replacedvalidatorwithfield_validatorfor template validation. [1] [2]langtest/augmentation/utils.py: Addedmodelfield with default value"gpt-4o-mini"toOpenAIConfigandAzureOpenAIConfigclasses. [1] [2]Dynamic model name setting:
langtest/augmentation/utils.py: Introducedmodel_namevariable to dynamically set the model ingenerate_templates_azoiandgenerate_templates_openaifunctions, removing hardcoded model names. [1] [2] [3] [4]Removal of redundant code:
langtest/augmentation/utils.py: Removed themax_tokensparameter from thegenerate_templates_azoiandgenerate_templates_openaifunctions. [1] [2]