Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RateLimitError #7130

Closed
14 tasks
huangl22 opened this issue Jul 4, 2023 · 4 comments
Closed
14 tasks

RateLimitError #7130

huangl22 opened this issue Jul 4, 2023 · 4 comments
Labels
🤖:question A specific question about the codebase, product, project, or how to use a feature

Comments

@huangl22
Copy link

huangl22 commented Jul 4, 2023

System Info

Retrying langchain.embeddings.openai.embed_with_retry.._embed_with_retry in 4.0 seconds as it raised RateLimitError: Rate limit reached for default-text-embedding-ada-002 in organization org-gvlyS3A1UcZNvf8Qch6TJZe3 on tokens per min. Limit: 150000 / min. Current: 1 / min. Contact us through our help center at help.openai.com if you continue to have issues. Please add a payment method to your account to increase your rate limit. Visit https://platform.openai.com/account/billing to add a payment method..

Who can help?

No response

Information

  • The official example notebooks/scripts
  • My own modified scripts

Related Components

  • LLMs/Chat Models
  • Embedding Models
  • Prompts / Prompt Templates / Prompt Selectors
  • Output Parsers
  • Document Loaders
  • Vector Stores / Retrievers
  • Memory
  • Agents / Agent Executors
  • Tools / Toolkits
  • Chains
  • Callbacks/Tracing
  • Async

Reproduction

from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.text_splitter import CharacterTextSplitter
from langchain.vectorstores import FAISS
from langchain.document_loaders import PyPDFLoader
import os

loader = PyPDFLoader("3gpp_cn/29502-i30.pdf")
pages = loader.load_and_split()
embeddings = OpenAIEmbeddings()
db = FAISS.from_documents(pages, embeddings)

db.save_local("numpy_faiss_index")

Expected behavior

How to solve it?

@dosubot dosubot bot added the 🤖:question A specific question about the codebase, product, project, or how to use a feature label Jul 4, 2023
@conboy
Copy link
Contributor

conboy commented Jul 4, 2023

I suggest waiting a bit before running the program again, I have ran into this issue before because I was embedding a 500 page textbook over and over again in a short span of time which can make you reach the API limit very easily.

@huangl22
Copy link
Author

huangl22 commented Jul 4, 2023

I have waited for one day

@conboy
Copy link
Contributor

conboy commented Jul 4, 2023

Do you have a payment method attached to your OpenAI account?

@dosubot
Copy link

dosubot bot commented Oct 5, 2023

Hi, @huangl22! I'm Dosu, and I'm here to help the LangChain team manage their backlog. I wanted to let you know that we are marking this issue as stale.

From what I understand, you are experiencing a RateLimitError when using the OpenAIEmbeddings module. There have been a couple of suggestions in the comments, such as waiting before running the program again and checking if you have a payment method attached to your OpenAI account. However, it seems that the issue remains unresolved at this time.

Could you please let us know if this issue is still relevant to the latest version of the LangChain repository? If it is, please comment on this issue to let us know. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days.

Thank you for your understanding and cooperation. We appreciate your contribution to the LangChain community!

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Oct 5, 2023
@dosubot dosubot bot closed this as not planned Won't fix, can't repro, duplicate, stale Oct 12, 2023
@dosubot dosubot bot removed the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Oct 12, 2023
@dosubot dosubot bot mentioned this issue Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤖:question A specific question about the codebase, product, project, or how to use a feature
Projects
None yet
Development

No branches or pull requests

2 participants