-
Notifications
You must be signed in to change notification settings - Fork 267
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
[bug] Handle failed OpenAI API requests #167
Comments
Looks like latest version Feel free to close this issue. |
@matejm can you check if you are able to call the API with the above config without wrapped by the guard object? |
Hey @matejm @ShreyaR @stchau4work Would recommend wrapping the base openai call with
Source: https://github.com/BerriAI/reliableGPT -- |
Thanks for the issue @matejm. @stchau4work not sure what you mean, please open a separate issue. |
Describe the bug
Currently, when using OpenAI chat completion API, and the API response fails (possible failure reasons: invalid API key, too many requests, network error, etc), library throws the following error:
Error is far from descriptive, it actually hides the actual problem from the developer.
To Reproduce
Steps to reproduce the behavior:
Simply run request without a valid API key.
Expected behavior
Return invalid response or throw informative error which would allow developers to figure out what went wrong.
Library version:
Version 0.1.6
The text was updated successfully, but these errors were encountered: