返回提交历史
Modified
g4f/tools/run_tools.py
+0
-1
Modified
g4f/tools/web_search.py
+1
-2
XFEstudio/gpt4free
Test search
da324565
代码差异
2 个文件
+1
-3
@@ -290,7 +290,6 @@ def iter_run_tools(
290
290
# Note: Using asyncio.run inside sync function is not ideal, but maintaining original pattern
291
291
messages[-1]["content"], sources = asyncio.run(do_search(messages[-1]["content"], search_query))
292
292
except Exception as e:
293
raise e
294
293
debug.error(f"Couldn't do web search:", e)
295
294
296
295
# Get API key if needed
@@ -14,8 +14,7 @@ try:
14
14
from ddgs.exceptions import DDGSException
15
15
from bs4 import BeautifulSoup
16
16
has_requirements = True
17
except ImportError as e:
18
raise e
17
except ImportError:
19
18
has_requirements = False
20
19
21
20
try: