Handle azure_deployment Parameter Issue in GPTAssistantAgent to Maintain Compatibility with OpenAIWrapper#1721
Merged
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1721 +/- ##
===========================================
+ Coverage 39.33% 51.17% +11.83%
===========================================
Files 57 57
Lines 6096 6097 +1
Branches 1365 1482 +117
===========================================
+ Hits 2398 3120 +722
+ Misses 3502 2729 -773
- Partials 196 248 +52
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
sonichi
suggested changes
Feb 19, 2024
sonichi
left a comment
Contributor
There was a problem hiding this comment.
@qingyun-wu please don't run the openai contrib test until the logging of api_keys etc. is removed.
…AL/autogen into fix-gpt-assistant-model
sonichi
approved these changes
Feb 23, 2024
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.
Why are these changes needed?
context
The GPTAssistantAgent supports an optional
azure_deploymentparameter, which, when specified during the initialization of the AzureOpenAI client, leads to aNotFoundErrorwith error code 404 on callingclient.beta.assistants.list():Omitting the azure_deployment parameter results in normal operation. This behavior is incompatible with the implementation logic of OpenAIWrapper and implies a potential deficiency in the AzureOpenAI implementation(openai/openai-python#1163).
Notably, GPTAssistantAgent requires the model/azure_deployment to be specified only when calling client.beta.assistants.create.
To circumvent this issue without affecting the existing logic of other agents and before a fix is released for the openai python library, we should locally handle the azure_deployment parameter within GPTAssistantAgent.
What to do in this PR?
The PR addresses the comprehensive handling of llm config issues outlined in #1688.
Related issue number
Closes #1688
Checks