Find answers from the community

Updated 3 months ago

Rate limit

Rate limit from OpenAI?
I am trying to go through this https://gpt-index.readthedocs.io/en/latest/examples/usecases/10k_sub_question.html but got rate limit error when creating lyft_engine = lyft_index.as_query_engine(similarity_top_k=3)
Plain Text
openai.error.RateLimitError: You exceeded your current quota, please check your plan and billing details.

The above exception was the direct cause of the following exception:

I am a paid individual user and only used the example pdf to create lyft_docs
How many requests does llama index send to openai backend? It showed 0 usage on my openai dashboard. Is there a way to bypass this when creating embedding?

Thanks so much!
L
s
6 comments
Weird, that line of code doesn't send and api calls πŸ€”
The trace looks like this and from self._build_index_from_nodes
Or actually 10 analysis example can disable openai api? But I guess this is needed for embedding?
Oh, that traceback if from a different line of code that posted, that makes more sense.

Tbh I've never hit this rate limit error. You try lowering the embedding batch size using the service context (the default is 10)

Plain Text
from llama_index.embeddings import OpenAIEmbedding

embed_model = OpenAIEmbedding(embed_batch_size=1)

service_context = ServiceContext.from_defaults(..., embed_model=embed_model)
Ahh!! After changing the batch size and it works now!
Thanks so much!
Add a reply
Sign up and join the conversation on Discord