retriver = PineconeVectorStore(
pinecone_api_key=pc_key,
index="index-1",
embedding=OpenAIEmbeddings()
).as_retriever()
qa_chain = (
{
"context": retriver,
"question": RunnablePassthrough(),
}
| review_template
| model
| StrOutputParser()
)
res =qa_chain.invoke("Question")
print(res)
Output of the code snipet : “AttributeError: ‘str’ object has no attribute ‘query”
Expecting Output: retrive data from pinecone vectordb and create good answer for users.