From 0d08e7707cb918342d43a80d6e822ecc88199cb7 Mon Sep 17 00:00:00 2001 From: zhulixi <48713110+zlxxlz1026@users.noreply.github.com> Date: Sat, 20 May 2023 22:19:35 +0800 Subject: [PATCH] Fix a bug where langchain memories were not being cleaned (#71) --- question.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/question.py b/question.py index 5f3d7f026..fab4874f5 100644 --- a/question.py +++ b/question.py @@ -41,6 +41,8 @@ def chat_with_doc(model, vector_store: SupabaseVectorStore, stats_db): if clear_history: + # Clear memory in Langchain + memory.clear() st.session_state['chat_history'] = [] st.experimental_rerun()