Got rate limit messages which hasn't gone away after few hours

Anyone knows what to do if you got this error message, which has persisted for several hours.

openai.error.RateLimitError: Rate limit reached for default-gpt-4 in organization org-… on tokens per min. Limit: 40000 / min. Please try again in 1ms. Contact us through our help center at help.openai.com if you continue to have issues.

Hi,

I looks like a temporary message asking you to wait 1/1000th of a second until you try again, assuming the message is correct then you might build in some back off code into your API call that waits 5-10ms upon receiving this error.

The is a TPM error @bach , meaning that you’re sending higher number of tokens per minute than the actual limit assigned to your org.

To avoid this error, you can use tiktoken to count tokens and make sure that you’re not going above the TPM limit.

1 Like

Figured out that i send a huge huge message with 200K token. And instead of token limit message i got tpm limit message.

1 Like