XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 0
返回提交历史

XFEstudio/gpt4free

Test search

da324565
hlohaus <983577+hlohaus@users.noreply.github.com>
提交于

代码差异

2 个文件 +1 -3
Modified g4f/tools/run_tools.py +0 -1
@@ -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
Modified g4f/tools/web_search.py +1 -2
@@ -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: