MoudClam commited on
Commit
73e12a7
·
verified ·
1 Parent(s): 9fb9c7f

Update tools/web_search.py

Browse files

duckduckgo_search replaced by ddgs.

Files changed (1) hide show
  1. tools/web_search.py +2 -2
tools/web_search.py CHANGED
@@ -1,6 +1,6 @@
1
  from typing import Any, Optional
2
  from smolagents.tools import Tool
3
- import duckduckgo_search
4
 
5
  class DuckDuckGoSearchTool(Tool):
6
  name = "web_search"
@@ -12,7 +12,7 @@ class DuckDuckGoSearchTool(Tool):
12
  super().__init__()
13
  self.max_results = max_results
14
  try:
15
- from duckduckgo_search import DDGS
16
  except ImportError as e:
17
  raise ImportError(
18
  "You must install package `duckduckgo_search` to run this tool: for instance run `pip install duckduckgo-search`."
 
1
  from typing import Any, Optional
2
  from smolagents.tools import Tool
3
+ import ddgs
4
 
5
  class DuckDuckGoSearchTool(Tool):
6
  name = "web_search"
 
12
  super().__init__()
13
  self.max_results = max_results
14
  try:
15
+ from ddgs import DDGS
16
  except ImportError as e:
17
  raise ImportError(
18
  "You must install package `duckduckgo_search` to run this tool: for instance run `pip install duckduckgo-search`."