Commit
·
a547b75
1
Parent(s):
2bb821d
workflow errors debugging v5
Browse files
app.py
CHANGED
|
@@ -360,7 +360,10 @@ async def process_message_async(message: str, history: Optional[List], session_i
|
|
| 360 |
response = str(result) if result else "Processing complete."
|
| 361 |
|
| 362 |
# Final safety check - ensure response is not empty
|
| 363 |
-
|
|
|
|
|
|
|
|
|
|
| 364 |
response = f"I understand you said: '{message}'. I'm here to assist you!"
|
| 365 |
|
| 366 |
logger.info(f"Orchestrator returned response (length: {len(response)})")
|
|
|
|
| 360 |
response = str(result) if result else "Processing complete."
|
| 361 |
|
| 362 |
# Final safety check - ensure response is not empty
|
| 363 |
+
# Handle both string and dict types
|
| 364 |
+
if isinstance(response, dict):
|
| 365 |
+
response = str(response.get('content', response))
|
| 366 |
+
if not response or (isinstance(response, str) and len(response.strip()) == 0):
|
| 367 |
response = f"I understand you said: '{message}'. I'm here to assist you!"
|
| 368 |
|
| 369 |
logger.info(f"Orchestrator returned response (length: {len(response)})")
|