Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chat history makes the system deadlock. #46

Open
dk-teknologisk-mlnn opened this issue Nov 6, 2023 · 0 comments
Open

chat history makes the system deadlock. #46

dk-teknologisk-mlnn opened this issue Nov 6, 2023 · 0 comments

Comments

@dk-teknologisk-mlnn
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant