Reputation: 1
I want to create a conversational retrieval chain. for that I try this block of code,
def get_conversation_chain(vector_store):
llm = HuggingFaceHub(repo_id="google/flan-t5-xxl", model_kwargs={"temperature":0.5, "max_length":512})
memory = ConversationBufferMemory(memory_key="chat_history",return_message=True)
conversation_chain = ConversationalRetrievalChain.from_llm(
llm=llm,
retriever = vector_store.as_retriever(),
memory=memory
)
return conversation_chain
but, I got this error : 'IndexFlatL2' object has no attribute 'as_retriever'
I wanted to create a chat-bot. user can ask question and bot will give answers according to the vector store.
Upvotes: 0
Views: 237