Significant-Gravitas / AutoGPT-Code-Ability

🖥️ AutoGPT's Coding Ability - empowering everyone to build software using AI
MIT License
100 stars 26 forks source link

Implement Dynamic Retry Mechanism to Handle OpenAI API Rate Limits #297

Open elersong opened 4 weeks ago

elersong commented 4 weeks ago

I am a first-time user of the OpenAI API for GPT-4o and have encountered a limitation due to the low rate limits on my account. During my usage, I've found that my attempts to utilize the "Code Ability" feature frequently stall out because I quickly hit the per-minute rate limit.

Feature Request:

I am requesting the implementation of a retry mechanism or a waiting period that allows the server to automatically handle and wait out the per-minute rate limitations imposed by the OpenAI API. This feature should include a parser to read the suggested wait time from the OpenAI rate limiting error and wait at least that amount of time before retrying.

Proposed Solution:

Benefits:

Additional Context: