Spaces:
Sleeping
Sleeping
Update chatbot.py
Browse files- chatbot.py +2 -2
chatbot.py
CHANGED
@@ -21,8 +21,8 @@ class Comsatsbot:
|
|
21 |
|
22 |
|
23 |
# Initialize memory buffer and MongoDB connection
|
24 |
-
|
25 |
-
self.memory = ConversationBufferMemory( return_messages=True, memory_key="chat_history")
|
26 |
self.chats_collection = chats_collection
|
27 |
self.index_path = index_path
|
28 |
self.hf = hf
|
|
|
21 |
|
22 |
|
23 |
# Initialize memory buffer and MongoDB connection
|
24 |
+
self.memory = ConversationTokenBufferMemory(llm=self.llm, max_token_limit=3000 )
|
25 |
+
#self.memory = ConversationBufferMemory( return_messages=True, memory_key="chat_history")
|
26 |
self.chats_collection = chats_collection
|
27 |
self.index_path = index_path
|
28 |
self.hf = hf
|