You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have to comment out the chat_history append for it to work. if the conversation is added to the history, only the first question I ask will receive an answer.
With this #:
#chat_history.append((query, result['answer']))
I can keep asking questions, but lose the functionality that it knows what the last question was.
I see the langchain docs that we need to allocate chat history memory objects. but doing this does not help.
I have to comment out the chat_history append for it to work. if the conversation is added to the history, only the first question I ask will receive an answer.
With this #:
#chat_history.append((query, result['answer']))
I can keep asking questions, but lose the functionality that it knows what the last question was.
I see the langchain docs that we need to allocate chat history memory objects. but doing this does not help.
memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True)
chain = ConversationalRetrievalChain.from_llm(
llm=ChatOpenAI(model="gpt-3.5-turbo"),
retriever=index.vectorstore.as_retriever(search_kwargs={"k": 1}),
memory=memory
)
with this, it still deadlocks.
The text was updated successfully, but these errors were encountered: