mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-02-23 15:14:44 +01:00
fix(agent, forge): Conform web_search.py to duckduckgo_search v5 (#7045)
Update `web_search` command for both autogpt and forge to adjust for breaking change in v5 of `duckduckgo_search`
This commit is contained in:
committed by
GitHub
parent
5f9cc585b1
commit
12640f7092
@@ -42,8 +42,7 @@ async def web_search(agent, task_id: str, query: str) -> str:
|
||||
if not query:
|
||||
return json.dumps(search_results)
|
||||
|
||||
results = DDGS().text(query)
|
||||
search_results = list(islice(results, num_results))
|
||||
search_results = DDGS().text(query, max_results=num_results)
|
||||
|
||||
if search_results:
|
||||
break
|
||||
|
||||
@@ -21,7 +21,7 @@ toml = "^0.10.2"
|
||||
jinja2 = "^3.1.2"
|
||||
uvicorn = "^0.23.2"
|
||||
litellm = "^1.17.9"
|
||||
duckduckgo-search = "^4.0.0"
|
||||
duckduckgo-search = "^5.0.0"
|
||||
selenium = "^4.13.0"
|
||||
bs4 = "^0.0.1"
|
||||
agbenchmark = { path = "../../benchmark", optional = true }
|
||||
|
||||
Reference in New Issue
Block a user