chatgpt-retrieval icon indicating copy to clipboard operation
chatgpt-retrieval copied to clipboard

chat history makes the system deadlock.

Open dk-teknologisk-mlnn opened this issue 1 year ago • 0 comments

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.

dk-teknologisk-mlnn avatar Nov 06 '23 09:11 dk-teknologisk-mlnn