From 4843bca0d3a9c26a344bdf72960de18d3bd39678 Mon Sep 17 00:00:00 2001 From: MarkLo127 Date: Mon, 9 Mar 2026 15:14:48 +0800 Subject: [PATCH] Update news data and technical indicator utility functions. --- tradingagents/agents/utils/news_data_tools.py | 2 ++ tradingagents/agents/utils/technical_indicators_tools.py | 1 + 2 files changed, 3 insertions(+) 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()