fix(graph): integrate #487 + #567 — sentiment label, route, propagate asset_type

- analyst_execution.py: rename "Social Analyst" / "Msg Clear Social"
  to "Sentiment Analyst" / "Msg Clear Sentiment" to match v0.2.5.
- conditional_logic.should_continue_social returns the renamed route.
- TradingAgentsGraph.propagate accepts asset_type and threads through
  to Propagator.create_initial_state.
- Regression test on the Sentiment Analyst label.

Verified end-to-end (NVDA stock + BTC-USD crypto) on gpt-5.4-mini.
This commit is contained in:
Yijia-Xiao committed 2026-05-17 07:25:59 +00:00
1 parent a2e7ac1599
commit 3e5e99b368
4 files changed
+34 -10

No files matched your search

+8 -2
View File
@@ -20,12 +20,18 @@ class ConditionalLogic:
return "Msg Clear Market"
def should_continue_social(self, state: AgentState):
"""Determine if social media analysis should continue."""
"""Determine if sentiment-analyst tool round should continue.
Method name keeps the legacy ``social`` suffix to match the
``AnalystType.SOCIAL = "social"`` wire value (saved-config
back-compat); the returned ``clear_node`` label uses the v0.2.5
rename so it matches the node registered by the execution plan.
"""
messages = state["messages"]
last_message = messages[-1]
if last_message.tool_calls:
return "tools_social"
return "Msg Clear Social"
return "Msg Clear Sentiment"
def should_continue_news(self, state: AgentState):
"""Determine if news analysis should continue."""