open-interpreter icon indicating copy to clipboard operation
open-interpreter copied to clipboard

Continously hitting a RateLimitError?

Open samichamoun opened this issue 2 years ago • 5 comments
trafficstars

Describe the bug

When running very basic commands I keep receiving the following error. I am on a paid account and am attempting to use GPT4 Turbo.

openai.error.RateLimitError: Rate limit reached for gpt-4-vision-preview in organization org-Q9vvEy5YJC6STTnRFeWCuWCa on tokens per min (TPM): Limit 10000, Used 6921, Requested 5696. Please try again in 15.702s. Visit https://platform.openai.com/account/rate-limits to learn more.

I was having the issue 24 hours ago and only just picked it back up today and it had the same issue on first attempt. Is there a way to get a bit more output on what the request looks like to see how I am possibly using the tokens inefficiently?

Reproduce

  1. interpreter -y --vision --model gpt-4-1106-preview
  2. I then run the command "Save this conversation"

openai.error.RateLimitError: Rate limit reached for gpt-4-vision-preview in organization org-Q9vvEy5YJC6STTnRFeWCuWCa on tokens per min (TPM): Limit 10000, Used 6921, Requested 5696. Please try again in 15.702s. Visit https://platform.openai.com/account/rate-limits to learn more.

Re-running the application I was prompted to upgrade

  1. pip install --upgrade open-interpreter.
  2. Received the error again: openai.error.RateLimitError: Rate limit reached for gpt-4-vision-preview in organization org-Q9vvEy5YJC6STTnRFeWCuWCa on tokens per min (TPM): Limit 10000, Used 6740, Requested 4970. Please try again in 10.26s. Visit https://platform.openai.com/account/rate-limits to learn more.

Expected behavior

Expect it would save the conversation and then wait for another command

Screenshots

No response

Open Interpreter version

0.1.14

Python version

3.12.0

Operating System name and version

Windows 11

Additional context

No response

samichamoun avatar Nov 16 '23 02:11 samichamoun

It sounds like you might need to reduce the max_tokens based on the token counts in the error message.

You can see an estimate of how many tokens would be sent with the next request with the experimental %tokens magic command.

ericrallen avatar Nov 16 '23 02:11 ericrallen

It sounds like you might need to reduce the max_tokens based on the token counts in the error message.

You can see an estimate of how many tokens would be sent with the next request with the experimental %tokens magic command.

How do I reduce the max_tokens? Shouldn't it only use as much as necessary anyway?

samichamoun avatar Nov 16 '23 05:11 samichamoun

The Vision and Turbo GPT-4 models are super new. I’m not sure if every underlying dependency has properly added support for them yet or knows how to estimate token usage for images yet.

you can also turn on debug_mode or use the %debug magic command to see what’s going on under the hood in more detail, though it can be a bit noisy due to the way terminal interfaces work.

max_tokens tells the model the maximum amount of tokens to use in responding. You can set it with the --max_tokens argument or as max_tokens in your configuration file.

If that doesn’t help, we’ll need more info about your conversation.

ericrallen avatar Nov 16 '23 05:11 ericrallen

The 1st tier of rate limits are pretty low on GPT-4-Turbo. Right now they are declining requests to increase your rate limit because they ran out of server capacity. If you spend $50 on api credits you get upgraded to tier 2 rate limits though which usually gets the job done.

CyanideByte avatar Nov 19 '23 01:11 CyanideByte

The 1st tier of rate limits are pretty low on GPT-4-Turbo. Right now they are declining requests to increase your rate limit because they ran out of server capacity. If you spend $50 on api credits you get upgraded to tier 2 rate limits though which usually gets the job done.

I don't think it will work for me then, i'm new and im on tier 1 with 10$ spent today, tier2 need those 2 things :

Tier 2 | $50 paid and 7+ days since first successful payment source: https://platform.openai.com/docs/guides/rate-limits/usage-tiers

Toasterme avatar Dec 01 '23 13:12 Toasterme

Closing as this is subject to OpenAI tiers. Thanks!

MikeBirdTech avatar Mar 18 '24 20:03 MikeBirdTech