Rosehu commited on
Commit
92a99cf
·
verified ·
1 Parent(s): ce45243

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -15
app.py CHANGED
@@ -199,21 +199,31 @@ def make_tasks(inputs: Dict[str, Any]) -> List[Task]:
199
  )
200
 
201
  t6 = Task(
202
- description=textwrap.dedent(f"""
203
- Synthesize final portfolio and Markdown report.
204
- Inputs: all previous JSONs
205
- Ensure all numeric values are pre-computed (JSON-safe)
206
- Show human-readable calculations in Markdown
207
- Return STRICT JSON with keys:
208
- {{
209
- "final_portfolio": [...],
210
- "trade_summary": [...],
211
- "report_markdown": "..."
212
- }}
213
- """).strip(),
214
- agent=manager_agent,
215
- expected_output="JSON only."
216
- )
 
 
 
 
 
 
 
 
 
 
217
 
218
  return [t1, t2, t3, t4, t5, t6]
219
 
 
199
  )
200
 
201
  t6 = Task(
202
+ description=textwrap.dedent("""
203
+ Synthesize final portfolio and Markdown report with tables and insights.
204
+ Inputs: all previous JSON outputs (market_signals, sentiments, trades, risk_approval, costs)
205
+ Requirements:
206
+ 1. Portfolio Summary (Markdown table: Asset | Action | Quantity | Price ($) | Approved)
207
+ 2. Trades Executed (Markdown table: Trade ID | Action | Approved | Fee ($) | Tax ($) | Net Effect ($))
208
+ 3. Risk Approvals (Markdown table: Trade ID | Approved | Reason)
209
+ 4. Fees & Taxes (shown in Trades Executed table)
210
+ 5. Insights & Recommendations:
211
+ - Provide 1-2 beginner-friendly bullet points per asset, explaining:
212
+ * Why the trade was executed or held
213
+ * Any risk considerations
214
+ * Any fee/tax impact
215
+ - All numeric values must be pre-computed (JSON-safe)
216
+ - Return STRICT JSON:
217
+ {
218
+ "final_portfolio": [...],
219
+ "trade_summary": [...],
220
+ "report_markdown": "..."
221
+ }
222
+ """).strip(),
223
+ agent=manager_agent,
224
+ expected_output="JSON only."
225
+ )
226
+
227
 
228
  return [t1, t2, t3, t4, t5, t6]
229