gkamradt / langchain-tutorials

Overview and tutorial of the LangChain Library
6.63k stars 1.92k forks source link

Embed_with_retry in 4.0 seconds as it raised RateLimitError following "Ask A Book Questions.ipynb" #42

Closed RedLizy closed 1 year ago

RedLizy commented 1 year ago

Running the exact same code as "Ask A Book Questions.ipynb", I ran into the following error:

851c37b5287318fd848c2d3d8567423

Diagnosis (they all return the above error):

  1. I topped up my OpenAI account for $20. The request didn't charge a single dollar from my account. I guess it's not my account's problem.
  2. I reduced the size of the PDF to one sentence "This is a stupidly small file". I guess it's not due to the size of the texts.

What is the problem?

gkamradt commented 1 year ago

This will used the embeddings engine when counting for rate limits

https://platform.openai.com/docs/guides/rate-limits/what-are-the-rate-limits-for-our-api

Unsure about how long your text is, but this is a openai + langchain issue, not an issue w/ this repo so I'm going to close it