mirror of
https://github.com/TauricResearch/TradingAgents.git
synced 2026-09-23 21:18:26 +03:00
fix(agents): stop debate openers from rebutting a nonexistent argument
- the first speaker in each debate round received an empty opponent response, yet the prompt demanded a rebuttal, so models fabricated the other side - substitute an explicit opening marker when an opponent has not spoken, across all five debators (bull, bear, and the three risk analysts) #1176
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
from tradingagents.agents.utils.agent_utils import (
|
||||
get_instrument_context_from_state,
|
||||
get_language_instruction,
|
||||
opponent_argument_or_opening,
|
||||
)
|
||||
|
||||
|
||||
@@ -10,8 +11,12 @@ def create_aggressive_debator(llm):
|
||||
history = risk_debate_state.get("history", "")
|
||||
aggressive_history = risk_debate_state.get("aggressive_history", "")
|
||||
|
||||
current_conservative_response = risk_debate_state.get("current_conservative_response", "")
|
||||
current_neutral_response = risk_debate_state.get("current_neutral_response", "")
|
||||
current_conservative_response = opponent_argument_or_opening(
|
||||
risk_debate_state.get("current_conservative_response", ""), "conservative analyst"
|
||||
)
|
||||
current_neutral_response = opponent_argument_or_opening(
|
||||
risk_debate_state.get("current_neutral_response", ""), "neutral analyst"
|
||||
)
|
||||
|
||||
market_research_report = state["market_report"]
|
||||
sentiment_report = state["sentiment_report"]
|
||||
|
||||
Reference in New Issue
Block a user