Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -16,8 +16,8 @@ groq_chat = ChatGroq(
|
|
16 |
)
|
17 |
|
18 |
# Initialize memory to manages the chat history,
|
19 |
-
# ensuring the AI remembers the specified number of history messages, in this case
|
20 |
-
memory = ConversationBufferWindowMemory(k=
|
21 |
|
22 |
|
23 |
def generate_response(user_input, history, model, temperature, max_tokens, top_p, seed):
|
|
|
16 |
)
|
17 |
|
18 |
# Initialize memory to manages the chat history,
|
19 |
+
# ensuring the AI remembers the specified number of history messages, in this case 8.
|
20 |
+
memory = ConversationBufferWindowMemory(k=8, memory_key="chat_history", return_messages=True)
|
21 |
|
22 |
|
23 |
def generate_response(user_input, history, model, temperature, max_tokens, top_p, seed):
|