Rauhan commited on
Commit
6e09a79
1 Parent(s): 217fc47

UPDATE: chat history retention

Browse files
Files changed (1) hide show
  1. functions.py +3 -3
functions.py CHANGED
@@ -159,9 +159,9 @@ def format_docs(docs: str):
159
 
160
 
161
  def get_session_history(session_id: str) -> BaseChatMessageHistory:
162
- if session_id not in store:
163
- store[session_id] = ChatMessageHistory()
164
- return store[session_id]
165
 
166
 
167
  def trimMessages(chain_input):
 
159
 
160
 
161
  def get_session_history(session_id: str) -> BaseChatMessageHistory:
162
+ if session_id not in chatHistoryStore:
163
+ chatHistoryStore[session_id] = ChatMessageHistory()
164
+ return chatHistoryStore[session_id]
165
 
166
 
167
  def trimMessages(chain_input):