x3n0cr4735 / celi

CELI: A Framework for Controller-Embedded Language Interactions
MIT License
13 stars 5 forks source link

Added exponential backoff to handle OpenAI rate limiting. #82

Closed DaveDeCaprio closed 3 months ago

DaveDeCaprio commented 3 months ago

Rate limits reset once a minute, so when when we hit a limit, we wait a minute plus a random extra amount of time (from 0 to 40 seconds for the first back, up to 20 minutes for the 5th try).