Open fozrok opened 1 year ago
Try this:
pip install langchain==0.0.137
Hey @fozrok I also got this error, I have resolved it by just adding this line before initialising the llm variable.
Just add langchain.verbose = False
in previous line of initialisation of LLM.
Now the get_conversation_chain
should look something like this.
def get_conversation_chain(vectorstore):
langchain.verbose = False
# llm = ChatOpenAI()
llm = HuggingFaceHub(repo_id="google/flan-t5-xxl", model_kwargs={"temperature":0.5, "max_length":512})
memory = ConversationBufferMemory(
memory_key='chat_history', return_messages=True)
conversation_chain = ConversationalRetrievalChain.from_llm(
llm=llm,
retriever=vectorstore.as_retriever(),
memory=memory
)
return conversation_chain
Hope this should work for you, let me know what happened. Thanks.
I copied the entire code and I'm getting this error:
AttributeError: module 'langchain' has no attribute 'verbose' Traceback:
Also noticed that the code is missing the HTML User & Bot set up.
Not sure how to fix this.