Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,11 +36,12 @@ async def main_interface(user_text):
|
|
| 36 |
|
| 37 |
|
| 38 |
async def respond(message, history):
|
| 39 |
-
if history is None:
|
| 40 |
-
history = []
|
| 41 |
|
| 42 |
_, response_text = await main_interface(message)
|
| 43 |
-
|
|
|
|
|
|
|
| 44 |
|
| 45 |
return "", history
|
| 46 |
|
|
|
|
| 36 |
|
| 37 |
|
| 38 |
async def respond(message, history):
|
| 39 |
+
if history is None: history = []
|
|
|
|
| 40 |
|
| 41 |
_, response_text = await main_interface(message)
|
| 42 |
+
|
| 43 |
+
history.append({"role": "user", "content": message})
|
| 44 |
+
history.append({"role": "assistant", "content": response_text})
|
| 45 |
|
| 46 |
return "", history
|
| 47 |
|