Carlosito16 commited on
Commit
00662e9
1 Parent(s): b727c43

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -240,6 +240,10 @@ qa_retriever = load_retriever(llm= llm_model, db= vector_database)
240
  conversational_qa_memory_retriever, question_generator = load_conversational_qa_memory_retriever()
241
  print("all load done")
242
 
 
 
 
 
243
  #Addional things for Conversation flows
244
 
245
 
 
240
  conversational_qa_memory_retriever, question_generator = load_conversational_qa_memory_retriever()
241
  print("all load done")
242
 
243
+
244
+ # Try adding this to set to clear the memory in each session
245
+ if st.session_state.chat_history == []:
246
+ conversational_qa_memory_retriever.memory.chat_memory.clear()
247
  #Addional things for Conversation flows
248
 
249