Why does it take me a full minute to generate an answer using the following code?
def answer_with_pinecone(query, documents, embeddings):
pinecone.init(api_key=os.environ.get('PINECONE_API_KEY_REVENUED'),
environment=os.environ.get('PINECONE_ENVIRONMENT'))
docsearch = Pinecone.from_texts(
texts=[t.page_content for t in documents],
embedding=embeddings, index_name=os.environ.get('index_name'))
docs = docsearch.similarity_search(query)
llm = OpenAI(temperature=0, openai_api_key=openai.api_key)
chain = load_qa_chain(llm, chain_type="map_reduce")
answer = chain.run(input_documents=docs, question=query).lstrip()
return answer
I would much rather would take one second especially since this is for a production use case
I am very happy to pay for a premium subscription or a membership to your service if it will mean that I get faster response time. I am working for a client who has money to pay for this kind of thing period my main thing is just that I don’t want it to take a minute or a half a minute to get a answer to a question I wanted to take less than a second preferably.