-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Switched to AzureOpenAI for api_type=="azure" #1232
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1232 +/- ##
==========================================
+ Coverage 31.95% 41.81% +9.85%
==========================================
Files 33 33
Lines 4431 4415 -16
Branches 1035 1085 +50
==========================================
+ Hits 1416 1846 +430
+ Misses 2897 2421 -476
- Partials 118 148 +30
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doing this PR right requires some deep understanding of the code. #868 tried it but also didn't succeed. If my comment is hard to understand, please let me know and I can do the PR and make you a reviewer.
Looks good, tests pass |
* Switched to AzureOpenAI for api_type=="azure" * Setting AzureOpenAI to empty object if no `openai` * extra_ and openai_ kwargs * test_client, support for Azure and "gpt-35-turbo-instruct" * instruct/azure model in test_client_stream * generalize aoai support (#1) * generalize aoai support * Null check, fixing tests * cleanup test --------- Co-authored-by: Maxim Saplin <[email protected]> * Returning back model names for instruct * process model in create * None check --------- Co-authored-by: Chi Wang <[email protected]>
* Switched to AzureOpenAI for api_type=="azure" * Setting AzureOpenAI to empty object if no `openai` * extra_ and openai_ kwargs * test_client, support for Azure and "gpt-35-turbo-instruct" * instruct/azure model in test_client_stream * generalize aoai support (microsoft#1) * generalize aoai support * Null check, fixing tests * cleanup test --------- Co-authored-by: Maxim Saplin <[email protected]> * Returning back model names for instruct * process model in create * None check --------- Co-authored-by: Chi Wang <[email protected]>
With version 1 of
openai
client library there's a dedicated classAzureOpenAI
to handle Azure endpoints. While the current version had a cryptic_process_for_azure
workaround likely coming from pre v1 times it makes sense to remove the old code and hand over the responsibility of interacting with Azure straight toopenai
library/Checks
! I still don't have all the endpoints to completely run OpenAI tests, yet those few that ran before the change kept running after it.