diff --git a/tradingagents/agents/utils/news_data_tools.py b/tradingagents/agents/utils/news_data_tools.py index f4fe00c9..761932c0 100644 --- a/tradingagents/agents/utils/news_data_tools.py +++ b/tradingagents/agents/utils/news_data_tools.py @@ -36,6 +36,8 @@ def get_global_news( Returns: str: 一個包含全球新聞數據的格式化字串 """ + look_back_days = int(look_back_days) + limit = int(limit) return route_to_vendor("get_global_news", curr_date, look_back_days, limit) @tool diff --git a/tradingagents/agents/utils/technical_indicators_tools.py b/tradingagents/agents/utils/technical_indicators_tools.py index 9361895c..fdff247c 100644 --- a/tradingagents/agents/utils/technical_indicators_tools.py +++ b/tradingagents/agents/utils/technical_indicators_tools.py @@ -35,6 +35,7 @@ def get_indicators( Returns: str: 一個格式化的數據框,包含指定股票代碼和指標的技術指標。 """ + look_back_days = int(look_back_days) # 規範化指標名稱以匹配供應商的預期格式 indicator_lower = indicator.lower().strip()