Ensure all debate state fields initialized
This commit is contained in:
parent
a438acdbbd
commit
7b6f11dccd
|
|
@ -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,
|
||||
}
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in New Issue