Spaces:
Runtime error
Runtime error
Nyha15 commited on
Commit ·
f3ba91e
1
Parent(s): 66b667c
Refactored
Browse files
app.py
CHANGED
|
@@ -289,7 +289,26 @@ class CoordinatorAgent:
|
|
| 289 |
advice = {d: self.specialists[d].run(query, country) for d in self.specialists}
|
| 290 |
# 2. plan (omitted)
|
| 291 |
# 3. synthesis
|
| 292 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 293 |
# 4. return
|
| 294 |
return synthesis
|
| 295 |
|
|
|
|
| 289 |
advice = {d: self.specialists[d].run(query, country) for d in self.specialists}
|
| 290 |
# 2. plan (omitted)
|
| 291 |
# 3. synthesis
|
| 292 |
+
output = ["## Your Personalized Financial Advice\n"]
|
| 293 |
+
|
| 294 |
+
# If there’s truly unique content per domain:
|
| 295 |
+
for domain, txt in specialist_advice.items():
|
| 296 |
+
output.append(f"### {domain.capitalize()}\n{txt.strip()}\n")
|
| 297 |
+
|
| 298 |
+
# If you want to dedupe truly identical advice, you could:
|
| 299 |
+
# seen = set()
|
| 300 |
+
# for domain, txt in specialist_advice.items():
|
| 301 |
+
# if txt not in seen:
|
| 302 |
+
# seen.add(txt)
|
| 303 |
+
# output.append(f"### {domain.capitalize()}\n{txt.strip()}\n")
|
| 304 |
+
|
| 305 |
+
# Append your plans in a code‐block
|
| 306 |
+
output.append("## Multi-Path Plans\n```json\n")
|
| 307 |
+
output.append(json.dumps(plans, indent=2))
|
| 308 |
+
output.append("\n```")
|
| 309 |
+
|
| 310 |
+
synthesis = "\n".join(output)
|
| 311 |
+
log_workflow("Synthesis complete")
|
| 312 |
# 4. return
|
| 313 |
return synthesis
|
| 314 |
|