-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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]: Rate limit Timeout Sleep WAY too long #1121
Comments
hi, did you figured out how this will be solved? |
I have same issue with Claude. |
Pretty significant issue, as soon as you hit rate limits gptpilot is bricked |
just replace this part of code :(find this in core.llm.base.py) def rate_limit_sleep(self, err: Exception) -> Optional[datetime.timedelta]: with import re def rate_limit_sleep(self, err: Exception) -> Optional[datetime.timedelta]: |
@Bhalajee it didnot worked for me still its showing the same thing We've hit openai rate limit. Sleeping for 7200 seconds... |
Version
Command-line (Python) version
Operating System
Ubuntu Linux
What happened?
When GPT Pilot runs into openai.RateLimitError, it will sleep for well over what is necessary based on the response of the API..
openai.RateLimitError: Error code: 429 - {'error': {'message': 'Rate limit reached for gpt-4o in {REMOVED FOR BUG REPORT} on tokens per min (TPM): Limit 30000, Used 29328, Requested 6310. Please try again in 11.276s. Visit https://platform.openai.com/account/rate-limits to learn more.', 'type': 'tokens', 'param': None, 'code': 'rate_limit_exceeded'}}
GPT Pilot should ideally sleep for the suggested time in the response of 11.276s (maybe add 1 second). Instead, it sleeps for either 7200 seconds or 9600 seconds.. sometimes it prints both. And I have let it sit for hours and it never seems to start up again.
I dug into the source code and I think I may be able to fix this, and if its necessary I will create a pull request to merge into the main repository, but I wanted to first make sure that I am not missing something and just need to change the config.json, or something similar.
Thank you in advance, and if you have had this issue too and there is no obvious fix, please let me know and I will start to fix it myself and create a pull request. I'd love to contribute to this awesome project!
The text was updated successfully, but these errors were encountered: