Find answers from the community

Updated 10 months ago

Hello team llamalndex, we are getting

At a glance
Hello team llamalndex, we are getting below error while enabling model

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'}}
W
A
5 comments
It means that your OpenAI quota is consumed fully.

This is from OpenAI and not from LlamaIndex
You'll have to add some credits to use OpenAI again
ok thanks that helps a lot
Hello team llama index i have made some methods using your python lab. for my use , in that I'm making some chat engine where I'm asking question to engine but engine is give the response out of context also i want the response from the provided data only sharing the methods for your reference plz suggest me the best possible prompt or way to minimize the error or incorrect output


def create_engine_from_index(index, logger=log, req_id: str = ""):
try:
system_prompt = "Limit your knowledge to the given data only."
engine = index.as_chat_engine('context', system_prompt=system_prompt)
return engine
except Exception as ex:
logger.exception(f"Exception occurred during creating chat engine from index: {ex} {req_id}")
return None


def get_chat_engine_on_stimuli(transcript: str, logger=log, req_id: str = ""):
try:
llm = llama_OpenAI(temperature=0.1, model="gpt-3.5-turbo")
service_context = ServiceContext.from_defaults(llm=llm)
documents = [Document(text=t) for t in [transcript]]
index = GPTVectorStoreIndex.from_documents(documents, service_context=service_context)
engine = create_engine_from_index(index, logger=log)
return engine
except Exception as ex:
logger.exception(f"Exception occurred during creating chat engine: {ex} {req_id}")
return None


def ask_engine_que(engine, question, logger=log, req_id: str = "", retry=10):
try:
response = engine.chat(question)
return response.response
except RateLimitError as rex:
if retry > 0:
time.sleep(20)
return ask_engine_que(engine, question, logger, req_id, retry - 1)
logger.exception(f"RateLimitError occurred during asking question: {rex} {req_id}")
return ""
except Exception as ex:
logger.exception(f"Exception occurred during asking question: {ex} {req_id}")
return ""
Hello any revert on the above issue i have reported this on β€” 04/24/2024 7:01 PM
Add a reply
Sign up and join the conversation on Discord