Jeremy Live
commited on
Commit
·
e7f3f46
1
Parent(s):
c79d5a1
fix return data
Browse files
app.py
CHANGED
|
@@ -569,8 +569,9 @@ async def stream_agent_response(question: str, chat_history: List) -> List[Dict]
|
|
| 569 |
logger.error(error_msg, exc_info=True)
|
| 570 |
assistant_message["content"] = f"## ❌ Error\n\n{error_msg}"
|
| 571 |
|
| 572 |
-
# Return the
|
| 573 |
-
|
|
|
|
| 574 |
|
| 575 |
except Exception as e:
|
| 576 |
error_msg = f"## ❌ Error\n\nOcurrió un error al procesar tu solicitud:\n\n```\n{str(e)}\n```"
|
|
|
|
| 569 |
logger.error(error_msg, exc_info=True)
|
| 570 |
assistant_message["content"] = f"## ❌ Error\n\n{error_msg}"
|
| 571 |
|
| 572 |
+
# Return the message in the correct format for Gradio Chatbot
|
| 573 |
+
# Format: [(user_message, assistant_message)]
|
| 574 |
+
return [(None, assistant_message["content"])]
|
| 575 |
|
| 576 |
except Exception as e:
|
| 577 |
error_msg = f"## ❌ Error\n\nOcurrió un error al procesar tu solicitud:\n\n```\n{str(e)}\n```"
|