Merge remote-tracking branch 'upstream/main' into crypto-analysis-mvp
# Conflicts: # cli/utils.py # tradingagents/agents/analysts/social_media_analyst.py # tradingagents/agents/researchers/bear_researcher.py
This commit is contained in:
commit
a2f343bb54
40 files changed
+1731
-254
No files matched your search
@@ -52,7 +52,7 @@ class AgentState(MessagesState):
|
||||
|
||||
# research step
|
||||
market_report: Annotated[str, "Report from the Market Analyst"]
|
||||
sentiment_report: Annotated[str, "Report from the Social Media Analyst"]
|
||||
sentiment_report: Annotated[str, "Report from the Sentiment Analyst"]
|
||||
news_report: Annotated[
|
||||
str, "Report from the News Researcher of current world affairs"
|
||||
]
|
||||
|
||||
@@ -24,8 +24,10 @@ def get_language_instruction() -> str:
|
||||
"""Return a prompt instruction for the configured output language.
|
||||
|
||||
Returns empty string when English (default), so no extra tokens are used.
|
||||
Only applied to user-facing agents (analysts, portfolio manager).
|
||||
Internal debate agents stay in English for reasoning quality.
|
||||
Applied to every agent whose output reaches the saved report —
|
||||
analysts, researchers, debaters, research manager, trader, and
|
||||
portfolio manager — so a non-English run produces a fully localized
|
||||
report rather than a mix of languages.
|
||||
"""
|
||||
from tradingagents.dataflows.config import get_config
|
||||
lang = get_config().get("output_language", "English")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from langchain_core.tools import tool
|
||||
from typing import Annotated
|
||||
from typing import Annotated, Optional
|
||||
from tradingagents.dataflows.interface import route_to_vendor
|
||||
|
||||
@tool
|
||||
@@ -23,16 +23,20 @@ def get_news(
|
||||
@tool
|
||||
def get_global_news(
|
||||
curr_date: Annotated[str, "Current date in yyyy-mm-dd format"],
|
||||
look_back_days: Annotated[int, "Number of days to look back"] = 7,
|
||||
limit: Annotated[int, "Maximum number of articles to return"] = 5,
|
||||
look_back_days: Annotated[Optional[int], "Days to look back; omit to use the configured default"] = None,
|
||||
limit: Annotated[Optional[int], "Max articles to return; omit to use the configured default"] = None,
|
||||
) -> str:
|
||||
"""
|
||||
Retrieve global news data.
|
||||
Uses the configured news_data vendor.
|
||||
Uses the configured news_data vendor. Defaults for look_back_days and
|
||||
limit come from DEFAULT_CONFIG (global_news_lookback_days,
|
||||
global_news_article_limit); pass explicit values to override.
|
||||
|
||||
Args:
|
||||
curr_date (str): Current date in yyyy-mm-dd format
|
||||
look_back_days (int): Number of days to look back (default 7)
|
||||
limit (int): Maximum number of articles to return (default 5)
|
||||
look_back_days (int): Number of days to look back; omit to inherit config
|
||||
limit (int): Maximum number of articles to return; omit to inherit config
|
||||
|
||||
Returns:
|
||||
str: A formatted string containing global news data
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user