Merge remote-tracking branch 'upstream/main' into crypto-analysis-mvp
# Conflicts: # tradingagents/agents/researchers/bear_researcher.py # tradingagents/agents/researchers/bull_researcher.py # tradingagents/graph/propagation.py
This commit is contained in:
commit
5bae826749
39 files changed
+3259
-458
No files matched your search
@@ -1,6 +1,6 @@
|
||||
|
||||
|
||||
def create_bear_researcher(llm, memory):
|
||||
def create_bear_researcher(llm):
|
||||
def bear_node(state) -> dict:
|
||||
investment_debate_state = state["investment_debate_state"]
|
||||
history = investment_debate_state.get("history", "")
|
||||
@@ -19,13 +19,6 @@ def create_bear_researcher(llm, memory):
|
||||
else "Asset fundamentals report (may be unavailable for crypto)"
|
||||
)
|
||||
|
||||
curr_situation = f"{market_research_report}\n\n{sentiment_report}\n\n{news_report}\n\n{fundamentals_report}"
|
||||
past_memories = memory.get_memories(curr_situation, n_matches=2)
|
||||
|
||||
past_memory_str = ""
|
||||
for i, rec in enumerate(past_memories, 1):
|
||||
past_memory_str += rec["recommendation"] + "\n\n"
|
||||
|
||||
prompt = f"""You are a Bear Analyst making the case against investing in the {target_label}. Your goal is to present a well-reasoned argument emphasizing risks, challenges, and negative indicators. Leverage the provided research and data to highlight potential downsides and counter bullish arguments effectively.
|
||||
|
||||
Key points to focus on:
|
||||
@@ -44,8 +37,7 @@ Latest world affairs news: {news_report}
|
||||
{fundamentals_label}: {fundamentals_report}
|
||||
Conversation history of the debate: {history}
|
||||
Last bull argument: {current_response}
|
||||
Reflections from similar situations and lessons learned: {past_memory_str}
|
||||
Use this information to deliver a compelling bear argument, refute the bull's claims, and engage in a dynamic debate that demonstrates the risks and weaknesses of investing in the {target_label}. You must also address reflections and learn from lessons and mistakes you made in the past.
|
||||
Use this information to deliver a compelling bear argument, refute the bull's claims, and engage in a dynamic debate that demonstrates the risks and weaknesses of investing in the {target_label}.
|
||||
"""
|
||||
|
||||
response = llm.invoke(prompt)
|
||||
|
||||
Reference in new issue
Block a user