From 07b7e601cff214ea4a3663396762025efbe86023 Mon Sep 17 00:00:00 2001 From: promisery Date: Mon, 31 Mar 2025 09:59:51 +0800 Subject: [PATCH] Move the initialization of Wolfram Alpha client to the setup function --- src/opendeepsearch/wolfram_tool.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/opendeepsearch/wolfram_tool.py b/src/opendeepsearch/wolfram_tool.py index 5fcccf6..8b0cbb4 100644 --- a/src/opendeepsearch/wolfram_tool.py +++ b/src/opendeepsearch/wolfram_tool.py @@ -21,15 +21,10 @@ def __init__(self, app_id: str): self.app_id = app_id def setup(self): - self.search_tool = WolframAlphaTool( - self.app_id, - ) - - def forward(self, query: str): - # Initialize the Wolfram Alpha client self.wolfram_client = wolframalpha.Client(self.app_id) + def forward(self, query: str): try: # Send the query to Wolfram Alpha res = self.wolfram_client.query(query)