mirror of
https://github.com/TauricResearch/TradingAgents.git
synced 2026-05-01 14:33:10 +03:00
style: inline single-use instrument context vars
This commit is contained in:
@@ -15,8 +15,7 @@ from tradingagents.dataflows.config import get_config
|
|||||||
def create_fundamentals_analyst(llm):
|
def create_fundamentals_analyst(llm):
|
||||||
def fundamentals_analyst_node(state):
|
def fundamentals_analyst_node(state):
|
||||||
current_date = state["trade_date"]
|
current_date = state["trade_date"]
|
||||||
ticker = state["company_of_interest"]
|
instrument_context = build_instrument_context(state["company_of_interest"])
|
||||||
instrument_context = build_instrument_context(ticker)
|
|
||||||
|
|
||||||
tools = [
|
tools = [
|
||||||
get_fundamentals,
|
get_fundamentals,
|
||||||
|
|||||||
@@ -13,8 +13,7 @@ def create_market_analyst(llm):
|
|||||||
|
|
||||||
def market_analyst_node(state):
|
def market_analyst_node(state):
|
||||||
current_date = state["trade_date"]
|
current_date = state["trade_date"]
|
||||||
ticker = state["company_of_interest"]
|
instrument_context = build_instrument_context(state["company_of_interest"])
|
||||||
instrument_context = build_instrument_context(ticker)
|
|
||||||
|
|
||||||
tools = [
|
tools = [
|
||||||
get_stock_data,
|
get_stock_data,
|
||||||
|
|||||||
@@ -12,8 +12,7 @@ from tradingagents.dataflows.config import get_config
|
|||||||
def create_news_analyst(llm):
|
def create_news_analyst(llm):
|
||||||
def news_analyst_node(state):
|
def news_analyst_node(state):
|
||||||
current_date = state["trade_date"]
|
current_date = state["trade_date"]
|
||||||
ticker = state["company_of_interest"]
|
instrument_context = build_instrument_context(state["company_of_interest"])
|
||||||
instrument_context = build_instrument_context(ticker)
|
|
||||||
|
|
||||||
tools = [
|
tools = [
|
||||||
get_news,
|
get_news,
|
||||||
|
|||||||
@@ -8,8 +8,7 @@ from tradingagents.dataflows.config import get_config
|
|||||||
def create_social_media_analyst(llm):
|
def create_social_media_analyst(llm):
|
||||||
def social_media_analyst_node(state):
|
def social_media_analyst_node(state):
|
||||||
current_date = state["trade_date"]
|
current_date = state["trade_date"]
|
||||||
ticker = state["company_of_interest"]
|
instrument_context = build_instrument_context(state["company_of_interest"])
|
||||||
instrument_context = build_instrument_context(ticker)
|
|
||||||
|
|
||||||
tools = [
|
tools = [
|
||||||
get_news,
|
get_news,
|
||||||
|
|||||||
@@ -6,8 +6,7 @@ from tradingagents.agents.utils.agent_utils import build_instrument_context
|
|||||||
|
|
||||||
def create_research_manager(llm, memory):
|
def create_research_manager(llm, memory):
|
||||||
def research_manager_node(state) -> dict:
|
def research_manager_node(state) -> dict:
|
||||||
ticker = state["company_of_interest"]
|
instrument_context = build_instrument_context(state["company_of_interest"])
|
||||||
instrument_context = build_instrument_context(ticker)
|
|
||||||
history = state["investment_debate_state"].get("history", "")
|
history = state["investment_debate_state"].get("history", "")
|
||||||
market_research_report = state["market_report"]
|
market_research_report = state["market_report"]
|
||||||
sentiment_report = state["sentiment_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 create_risk_manager(llm, memory):
|
||||||
def risk_manager_node(state) -> dict:
|
def risk_manager_node(state) -> dict:
|
||||||
|
|
||||||
company_name = state["company_of_interest"]
|
instrument_context = build_instrument_context(state["company_of_interest"])
|
||||||
instrument_context = build_instrument_context(company_name)
|
|
||||||
|
|
||||||
history = state["risk_debate_state"]["history"]
|
history = state["risk_debate_state"]["history"]
|
||||||
risk_debate_state = state["risk_debate_state"]
|
risk_debate_state = state["risk_debate_state"]
|
||||||
|
|||||||
Reference in New Issue
Block a user