返回提交历史
Modified
g4f/tools/run_tools.py
+3
-3
Modified
requirements-slim.txt
+2
-2
Modified
requirements.txt
+1
-1
Modified
setup.py
+7
-7
XFEstudio/gpt4free
Fix ddgs search
acffc939
代码差异
4 个文件
+13
-13
@@ -216,8 +216,8 @@ async def perform_web_search(messages: Messages, web_search_param: Any) -> Tuple
216
216
search_query = web_search_param if isinstance(web_search_param, str) and web_search_param != "true" else None
217
217
messages[-1]["content"], sources = await do_search(messages[-1]["content"], search_query)
218
218
except Exception as e:
219
debug.error(f"Couldn't do web search: {e.__class__.__name__}: {e}")
220
219
debug.error(f"Couldn't do web search:", e)
220
221
221
return messages, sources
222
222
223
223
@@ -274,7 +274,7 @@ def iter_run_tools(
274
274
# Note: Using asyncio.run inside sync function is not ideal, but maintaining original pattern
275
275
messages[-1]["content"], sources = asyncio.run(do_search(messages[-1]["content"], search_query))
276
276
except Exception as e:
277
debug.error(f"Couldn't do web search: {e.__class__.__name__}: {e}")
277
debug.error(f"Couldn't do web search:", e)
278
278
279
279
# Get API key if needed
280
280
if provider is not None:
@@ -3,7 +3,6 @@ pycryptodome
3
3
curl_cffi>=0.6.2
4
4
aiohttp
5
5
certifi
6
duckduckgo-search>=6.3.7
7
6
nest_asyncio
8
7
werkzeug
9
8
pillow
@@ -17,4 +16,5 @@ cryptography
17
16
python-multipart
18
17
markitdown[all]
19
18
a2wsgi
20
python-dotenv
19
python-dotenv
20
ddgs
@@ -4,7 +4,6 @@ curl_cffi>=0.6.2
4
4
aiohttp
5
5
certifi
6
6
browser_cookie3
7
duckduckgo-search>=5.0
8
7
nest_asyncio
9
8
werkzeug
10
9
pillow
@@ -21,3 +20,4 @@ python-multipart
21
20
markitdown[all]
22
21
a2wsgi
23
22
python-dotenv
23
ddgs
@@ -21,9 +21,9 @@ EXTRA_REQUIRE = {
21
21
'all': [
22
22
"curl_cffi>=0.6.2",
23
23
"certifi",
24
"browser_cookie3", # get_cookies
25
"duckduckgo-search>=5.0", # internet.search
26
"beautifulsoup4", # internet.search and bing.create_images
24
"browser_cookie3", # get_cookies
25
"ddgs", # web_search
26
"beautifulsoup4", # web_search and bing.create_images
27
27
"platformdirs",
28
28
"aiohttp_socks", # proxy
29
29
"pillow", # image
@@ -44,8 +44,8 @@ EXTRA_REQUIRE = {
44
44
"curl_cffi>=0.6.2",
45
45
"certifi",
46
46
"browser_cookie3",
47
"duckduckgo-search>=5.0" ,# internet.search
48
"beautifulsoup4", # internet.search and bing.create_images
47
"ddgs", # web_search
48
"beautifulsoup4", # web_search and bing.create_images
49
49
"aiohttp_socks", # proxy
50
50
"pillow", # image
51
51
"werkzeug", "flask", # gui
@@ -75,12 +75,12 @@ EXTRA_REQUIRE = {
75
75
"gui": [
76
76
"werkzeug", "flask",
77
77
"beautifulsoup4", "pillow",
78
"duckduckgo-search>=5.0",
78
"ddgs",
79
79
],
80
80
"search": [
81
81
"beautifulsoup4",
82
82
"pillow",
83
"duckduckgo-search>=5.0",
83
"ddgs",
84
84
],
85
85
"local": [
86
86
"gpt4all"