feat(i18n): localize researchers, risk debators, research mgr, trader

output_language config now propagates to every user-facing agent.
Previously only the four analysts and portfolio manager respected
the setting, producing partial-localization reports with English
debate text interleaved with non-English analyst sections. Verified
live: 7 agents produce Chinese output when config is set to Chinese.

#575
This commit is contained in:
Yijia-Xiao committed 2026-05-11 05:41:42 +00:00
1 parent 384fe1a3d2
commit 6b384f74f9
8 files changed
+24 -10

No files matched your search

+5 -1
View File
@@ -7,7 +7,10 @@ import functools
from langchain_core.messages import AIMessage
from tradingagents.agents.schemas import TraderProposal, render_trader_proposal
from tradingagents.agents.utils.agent_utils import build_instrument_context
from tradingagents.agents.utils.agent_utils import (
build_instrument_context,
get_language_instruction,
)
from tradingagents.agents.utils.structured import (
bind_structured,
invoke_structured_or_freetext,
@@ -29,6 +32,7 @@ def create_trader(llm):
"You are a trading agent analyzing market data to make investment decisions. "
"Based on your analysis, provide a specific recommendation to buy, sell, or hold. "
"Anchor your reasoning in the analysts' reports and the research plan."
+ get_language_instruction()
),
},
{