Skip to content
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

Improved litellm exception handler #1604

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

TheFirstRandom
Copy link

Describe the changes you have made:

I improved the litellm exception handler in llm.py by adding a 15 sec backoff, if litellm returns litellm.exceptions.RateLimitError. If the rate limit exceeds a second time, interpreter displays a message that you should try again later and check your balance if you use an API. RateLimitError can be caused by depleted tokens.

Reference any relevant issues (e.g. "Fixes #000"):

None

Pre-Submission Checklist (optional but appreciated):

  • I have included relevant documentation updates (stored in /docs) -> Think there are no changes to make at all
  • I have read docs/CONTRIBUTING.md
  • I have read docs/ROADMAP.md

OS Tests (optional but appreciated):

  • Tested on Windows
  • Tested on MacOS
  • Tested on Linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant