Update app.py
Browse files
app.py
CHANGED
|
@@ -429,9 +429,8 @@ def create_interface():
|
|
| 429 |
|
| 430 |
def chat(message, history):
|
| 431 |
response, metadata = respond(message, history)
|
| 432 |
-
|
| 433 |
-
|
| 434 |
-
return "", history, metadata
|
| 435 |
msg.submit(chat, [msg, chatbot], [msg, chatbot, metadata_display])
|
| 436 |
submit.click(chat, [msg, chatbot], [msg, chatbot, metadata_display])
|
| 437 |
|
|
|
|
| 429 |
|
| 430 |
def chat(message, history):
|
| 431 |
response, metadata = respond(message, history)
|
| 432 |
+
history = history + [ChatMessage(role="user", content=message), ChatMessage(role="assistant", content=response)] return "", history, metadata
|
| 433 |
+
|
|
|
|
| 434 |
msg.submit(chat, [msg, chatbot], [msg, chatbot, metadata_display])
|
| 435 |
submit.click(chat, [msg, chatbot], [msg, chatbot, metadata_display])
|
| 436 |
|