-
Notifications
You must be signed in to change notification settings - Fork 370
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
Retry on Rate Limit Error #105
Conversation
PR Analysis
PR Feedback
How to use
|
/describe |
/reflect_and_review |
Questions to better understand the PR:
Please respond to the questions above in the following format:
|
/answer
|
PR Analysis
PR Feedback
How to use
|
/reflect_and_review |
Questions to better understand the PR:
Please respond to the questions above in the following format:
|
/answer
|
PR Analysis
PR Feedback
How to use
|
…t_error Retry on Rate Limit Error
PR Type:
Bug fix
PR Description:
This PR increases the number of retries for OpenAI API calls and adds handling for rate limit errors. It also includes logging for unknown errors during OpenAI inference.
PR Main Files Walkthrough:
pr_agent/algo/ai_handler.py
: The number of retries for OpenAI API calls has been increased from 2 to 5. Theretry
decorator on thechat_completion
method now includesRateLimitError
in its list of exceptions to retry on. Additional exception handling has been added forRateLimitError
and unknown exceptions, both of which log the error and re-raise it.