Anirudh1993 commited on
Commit
7ba1e4d
·
verified ·
1 Parent(s): eb03e74

Update document_chat.py

Browse files
Files changed (1) hide show
  1. document_chat.py +1 -0
document_chat.py CHANGED
@@ -48,5 +48,6 @@ def process_query_with_memory(query, chat_memory):
48
  retriever=retriever,
49
  memory=chat_memory
50
  )
 
51
 
52
  return conversation_chain.run({"question": query, "chat_history": chat_memory.memory if chat_memory else []})
 
48
  retriever=retriever,
49
  memory=chat_memory
50
  )
51
+ chat_history = chat_memory.chat_memory.messages if chat_memory else []
52
 
53
  return conversation_chain.run({"question": query, "chat_history": chat_memory.memory if chat_memory else []})