Anupam Gevariya
Anupam Gevariya

Reputation: 1

Rate limit error when i try to build simple lllama index application

  import os 
  from dotenv import load_dotenv
  load_dotenv()


  import os
  os.environ['OPENAI_API_KEY']=os.getenv("OPENAI_API_KEY")


  api_key = os.environ['OPENAI_API_KEY'] 



  from llama_index.core import VectorStoreIndex,SimpleDirectoryReader
  from llama_index.core import Settings


  documents = SimpleDirectoryReader("data").load_data()


  # index = VectorStoreIndex.from_documents(documents,show_progress=True)


  # from llama_index import VectorStoreIndex
  from langchain.embeddings.huggingface import HuggingFaceEmbeddings

  # Instantiate your Hugging Face model
  hugging_face_model_name = "sentence-transformers/all-MiniLM-L6-v2"
  hugging_face_embedding = HuggingFaceEmbeddings(model_name=hugging_face_model_name)


  # Create the VectorStoreIndex using Hugging Face embeddings
  index = VectorStoreIndex.from_documents(
      documents=documents,
      embed_model=hugging_face_embedding,
      show_progress=True
    
  )


query_engine = index.as_query_engine()

response = query_engine.query("What is the transformer")

i tried with new google account but still i got the same error. even i go through documentation but still got the same error. i have 5$ credit then also this error comes i used query engine and try to build the chat bot type thing that can answer queastion related to research paper "attention is all you need".

`Retrying llama_index.llms.openai.base.OpenAI._chat in 0.7754447074412383 seconds as it raised RateLimitError: Error code: 429 - {'error': {'message': 'You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors.', 'type': 'insufficient_quota', 'param': None, 'code': 'insufficient_quota'}}

`

Upvotes: 0

Views: 266

Answers (1)

Nathan Sodja
Nathan Sodja

Reputation: 5

yeah, I faced that issue too, contacted support, yet nothing, it appears that the $5 credit you have doesn't work.

As soon as I topped with another $5 everything started working and I received a new limit ceiling.

Upvotes: 0

Related Questions