OpenInterpreter / open-interpreter

A natural language interface for computers
http://openinterpreter.com/
GNU Affero General Public License v3.0
50.54k stars 4.4k forks source link

Should not crash from running out of money #1297

Open endolith opened 3 weeks ago

endolith commented 3 weeks ago

Describe the bug

Crashes when OpenAI account runs out of money

Reproduce

Use Open Interpreter when there is little money in account until it runs out.

Expected behavior

Should print the error message without crashing or dropping the conversation, so you can replenish account and continue.

Screenshots

    raise RateLimitError(
litellm.exceptions.RateLimitError: RateLimitError: OpenAIException - Error code: 429 - {'error': {'message': 'You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors.', 'type': 'insufficient_quota', 'param': None, 'code': 'insufficient_quota'}}

Open Interpreter version

0.2.5

Python version

Python 3.12.3

Operating System name and version

Windows 10

Additional context

No response