Ensure all debate state fields initialized

This commit is contained in:
Meghaditya Giri 2025-08-24 16:22:22 +05:30
parent a438acdbbd
commit 7b6f11dccd
1 changed files with 15 additions and 1 deletions

View File

@ -23,15 +23,29 @@ class Propagator:
"messages": [("human", company_name)],
"company_of_interest": company_name,
"trade_date": str(trade_date),
# Pre-populate debate state dictionaries with all required keys so
# downstream logic that reads from them doesn't encounter KeyError
"investment_debate_state": InvestDebateState(
{"history": "", "current_response": "", "count": 0}
{
"history": "",
"bull_history": "",
"bear_history": "",
"current_response": "",
"judge_decision": "",
"count": 0,
}
),
"risk_debate_state": RiskDebateState(
{
"history": "",
"risky_history": "",
"safe_history": "",
"neutral_history": "",
"latest_speaker": "",
"current_risky_response": "",
"current_safe_response": "",
"current_neutral_response": "",
"judge_decision": "",
"count": 0,
}
),