mirror of
https://github.com/xtekky/gpt4free.git
synced 2025-12-05 18:20:35 -08:00
Fix ddgs search
This commit is contained in:
parent
c4b18df769
commit
acffc939cf
4 changed files with 13 additions and 13 deletions
|
|
@ -216,7 +216,7 @@ async def perform_web_search(messages: Messages, web_search_param: Any) -> Tuple
|
|||
search_query = web_search_param if isinstance(web_search_param, str) and web_search_param != "true" else None
|
||||
messages[-1]["content"], sources = await do_search(messages[-1]["content"], search_query)
|
||||
except Exception as e:
|
||||
debug.error(f"Couldn't do web search: {e.__class__.__name__}: {e}")
|
||||
debug.error(f"Couldn't do web search:", e)
|
||||
|
||||
return messages, sources
|
||||
|
||||
|
|
@ -274,7 +274,7 @@ def iter_run_tools(
|
|||
# Note: Using asyncio.run inside sync function is not ideal, but maintaining original pattern
|
||||
messages[-1]["content"], sources = asyncio.run(do_search(messages[-1]["content"], search_query))
|
||||
except Exception as e:
|
||||
debug.error(f"Couldn't do web search: {e.__class__.__name__}: {e}")
|
||||
debug.error(f"Couldn't do web search:", e)
|
||||
|
||||
# Get API key if needed
|
||||
if provider is not None:
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ pycryptodome
|
|||
curl_cffi>=0.6.2
|
||||
aiohttp
|
||||
certifi
|
||||
duckduckgo-search>=6.3.7
|
||||
nest_asyncio
|
||||
werkzeug
|
||||
pillow
|
||||
|
|
@ -18,3 +17,4 @@ python-multipart
|
|||
markitdown[all]
|
||||
a2wsgi
|
||||
python-dotenv
|
||||
ddgs
|
||||
|
|
@ -4,7 +4,6 @@ curl_cffi>=0.6.2
|
|||
aiohttp
|
||||
certifi
|
||||
browser_cookie3
|
||||
duckduckgo-search>=5.0
|
||||
nest_asyncio
|
||||
werkzeug
|
||||
pillow
|
||||
|
|
@ -21,3 +20,4 @@ python-multipart
|
|||
markitdown[all]
|
||||
a2wsgi
|
||||
python-dotenv
|
||||
ddgs
|
||||
|
|
|
|||
12
setup.py
12
setup.py
|
|
@ -22,8 +22,8 @@ EXTRA_REQUIRE = {
|
|||
"curl_cffi>=0.6.2",
|
||||
"certifi",
|
||||
"browser_cookie3", # get_cookies
|
||||
"duckduckgo-search>=5.0", # internet.search
|
||||
"beautifulsoup4", # internet.search and bing.create_images
|
||||
"ddgs", # web_search
|
||||
"beautifulsoup4", # web_search and bing.create_images
|
||||
"platformdirs",
|
||||
"aiohttp_socks", # proxy
|
||||
"pillow", # image
|
||||
|
|
@ -44,8 +44,8 @@ EXTRA_REQUIRE = {
|
|||
"curl_cffi>=0.6.2",
|
||||
"certifi",
|
||||
"browser_cookie3",
|
||||
"duckduckgo-search>=5.0" ,# internet.search
|
||||
"beautifulsoup4", # internet.search and bing.create_images
|
||||
"ddgs", # web_search
|
||||
"beautifulsoup4", # web_search and bing.create_images
|
||||
"aiohttp_socks", # proxy
|
||||
"pillow", # image
|
||||
"werkzeug", "flask", # gui
|
||||
|
|
@ -75,12 +75,12 @@ EXTRA_REQUIRE = {
|
|||
"gui": [
|
||||
"werkzeug", "flask",
|
||||
"beautifulsoup4", "pillow",
|
||||
"duckduckgo-search>=5.0",
|
||||
"ddgs",
|
||||
],
|
||||
"search": [
|
||||
"beautifulsoup4",
|
||||
"pillow",
|
||||
"duckduckgo-search>=5.0",
|
||||
"ddgs",
|
||||
],
|
||||
"local": [
|
||||
"gpt4all"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue