Skip to content

Improved litellm exception handler #1604

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

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

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

Successfully merging this pull request may close these issues.

1 participant