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 more descriptive error message in the presence of OpenAI API timeouts #1577

Merged
merged 4 commits into from
Feb 7, 2024

Conversation

jackgerrits
Copy link
Member

@jackgerrits jackgerrits commented Feb 7, 2024

Why are these changes needed?

API timeouts can be confusing to a user. This adds a more descriptive error message when they occur and offers a suggestion to mitigate.

Related issue number

Checks

@jackgerrits jackgerrits requested a review from a team February 7, 2024 13:54
@jackgerrits jackgerrits changed the title Add more descriptive error message in the presence of OpenAI API time… Add more descriptive error message in the presence of OpenAI API timeouts Feb 7, 2024
@codecov-commenter
Copy link

codecov-commenter commented Feb 7, 2024

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (8ece258) 35.26% compared to head (5912087) 47.04%.

Files Patch % Lines
autogen/oai/client.py 20.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1577       +/-   ##
===========================================
+ Coverage   35.26%   47.04%   +11.78%     
===========================================
  Files          44       44               
  Lines        5323     5327        +4     
  Branches     1234     1305       +71     
===========================================
+ Hits         1877     2506      +629     
+ Misses       3292     2610      -682     
- Partials      154      211       +57     
Flag Coverage Δ
unittests 47.00% <20.00%> (+11.74%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

autogen/oai/client.py Outdated Show resolved Hide resolved
Copy link
Contributor

@sonichi sonichi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested a modification to consider different use cases.

autogen/oai/client.py Outdated Show resolved Hide resolved
@ekzhu ekzhu enabled auto-merge February 7, 2024 22:41
@ekzhu ekzhu added this pull request to the merge queue Feb 7, 2024
Merged via the queue into microsoft:main with commit d675489 Feb 7, 2024
43 of 53 checks passed
whiskyboy pushed a commit to whiskyboy/autogen that referenced this pull request Apr 17, 2024
…outs (microsoft#1577)

* Add more descriptive error message in the presence of OpenAI API timeouts

* handle specific exception

* Update autogen/oai/client.py

Co-authored-by: Chi Wang <[email protected]>

---------

Co-authored-by: Chi Wang <[email protected]>
Co-authored-by: Eric Zhu <[email protected]>
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.

5 participants