style: inline single-use instrument context vars

This commit is contained in:
CadeYu
2026-03-21 21:31:38 +08:00
parent 08bfe70a69
commit 7d200d834a
6 changed files with 6 additions and 12 deletions
@@ -6,8 +6,7 @@ from tradingagents.agents.utils.agent_utils import build_instrument_context
def create_research_manager(llm, memory):
def research_manager_node(state) -> dict:
ticker = state["company_of_interest"]
instrument_context = build_instrument_context(ticker)
instrument_context = build_instrument_context(state["company_of_interest"])
history = state["investment_debate_state"].get("history", "")
market_research_report = state["market_report"]
sentiment_report = state["sentiment_report"]
@@ -7,8 +7,7 @@ from tradingagents.agents.utils.agent_utils import build_instrument_context
def create_risk_manager(llm, memory):
def risk_manager_node(state) -> dict:
company_name = state["company_of_interest"]
instrument_context = build_instrument_context(company_name)
instrument_context = build_instrument_context(state["company_of_interest"])
history = state["risk_debate_state"]["history"]
risk_debate_state = state["risk_debate_state"]