Spaces:
Running
Running
Update agent_logic.py
Browse files- agent_logic.py +3 -1
agent_logic.py
CHANGED
|
@@ -250,7 +250,9 @@ class StrategicSelectorAgent:
|
|
| 250 |
await asyncio.sleep(0.5)
|
| 251 |
yield "Milestone 5 Complete. Self-Correction loop is live."
|
| 252 |
solution_draft_json_safe = json.dumps(solution_draft)
|
| 253 |
-
|
|
|
|
|
|
|
| 254 |
|
| 255 |
except Exception as e:
|
| 256 |
error_msg = f"An error occurred in the agent's solve loop: {e}"
|
|
|
|
| 250 |
await asyncio.sleep(0.5)
|
| 251 |
yield "Milestone 5 Complete. Self-Correction loop is live."
|
| 252 |
solution_draft_json_safe = json.dumps(solution_draft)
|
| 253 |
+
# Create a safe JSON string of the log
|
| 254 |
+
debug_log_json_safe = json.dumps(debug_log)
|
| 255 |
+
yield f"FINAL: {{\"text\": {solution_draft_json_safe}, \"audio\": null, \"log\": {debug_log_json_safe}}}"
|
| 256 |
|
| 257 |
except Exception as e:
|
| 258 |
error_msg = f"An error occurred in the agent's solve loop: {e}"
|