From 8c78b564ae06675d8e09fd779fd8fc7b4dc5de37 Mon Sep 17 00:00:00 2001 From: rdyzakya Date: Fri, 26 Dec 2025 10:43:48 +0800 Subject: [PATCH] force all openai search to search --- tradingagents/dataflows/openai.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tradingagents/dataflows/openai.py b/tradingagents/dataflows/openai.py index 6ba69361..abc387f0 100644 --- a/tradingagents/dataflows/openai.py +++ b/tradingagents/dataflows/openai.py @@ -28,6 +28,7 @@ def get_stock_news_openai(query, start_date, end_date): "search_context_size": "low", } ], + tool_choice={"type": "web_search_preview"}, temperature=1, max_output_tokens=4096, top_p=1, @@ -62,6 +63,7 @@ def get_crypto_news_openai(query, start_date, end_date): "search_context_size": "low", } ], + tool_choice={"type": "web_search_preview"}, temperature=1, max_output_tokens=4096, top_p=1, @@ -96,6 +98,7 @@ def get_global_news_openai(curr_date, look_back_days=7, limit=5): "search_context_size": "low", } ], + tool_choice={"type": "web_search_preview"}, temperature=1, max_output_tokens=4096, top_p=1, @@ -132,6 +135,7 @@ def get_fundamentals_openai(ticker, curr_date): "search_context_size": "low", } ], + tool_choice={"type": "web_search_preview"}, temperature=1, max_output_tokens=4096, top_p=1,