Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,9 @@ def respond(message, history):
|
|
11 |
|
12 |
# add all previous messages to the messages list
|
13 |
if history:
|
14 |
-
|
|
|
|
|
15 |
|
16 |
# add the current user's message to the messages list
|
17 |
messages.append({"role": "user", "content": message})
|
|
|
11 |
|
12 |
# add all previous messages to the messages list
|
13 |
if history:
|
14 |
+
for user_msg, assistant_msg in history:
|
15 |
+
messages.append({"role": "user", "content": user_msg})
|
16 |
+
messages.append({"role": "assistant", "content": assistant_msg})
|
17 |
|
18 |
# add the current user's message to the messages list
|
19 |
messages.append({"role": "user", "content": message})
|