Skip to content

Commit 0dfac36

Browse files
Remove duckduckgo-search as required dependency (#1271)
1 parent c6bec40 commit 0dfac36

File tree

6 files changed

+11
-8
lines changed

6 files changed

+11
-8
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ Full documentation can be found [here](https://huggingface.co/docs/smolagents/in
5151
5252
## Quick demo
5353

54-
First install the package.
54+
First install the package with a default set of tools:
5555
```bash
56-
pip install smolagents
56+
pip install smolagents[toolkit]
5757
```
5858
Then define your agent, give it the tools it needs and run it!
5959
```py

docs/source/en/examples/multiagents.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Let's set up this system.
2525
Run the line below to install the required dependencies:
2626

2727
```py
28-
! pip install markdownify duckduckgo-search smolagents --upgrade -q
28+
!pip install markdownify smolagents[toolkit] --upgrade -q
2929
```
3030

3131
Let's login to HF in order to call Inference Providers:

docs/source/en/guided_tour.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ When the agent is initialized, the tool attributes are used to generate a tool d
281281

282282
### Default toolbox
283283

284-
`smolagents` comes with a default toolbox for empowering agents, that you can add to your agent upon initialization with argument `add_base_tools=True`:
284+
If you install `smolagents` with the "toolkit" extra, it comes with a default toolbox for empowering agents, that you can add to your agent upon initialization with argument `add_base_tools=True`:
285285

286286
- **DuckDuckGo web search***: performs a web search using DuckDuckGo browser.
287287
- **Python code interpreter**: runs your LLM generated Python code in a secure environment. This tool will only be added to [`ToolCallingAgent`] if you initialize it with `add_base_tools=True`, since code-based agent can already natively execute Python code
@@ -290,6 +290,7 @@ When the agent is initialized, the tool attributes are used to generate a tool d
290290
You can manually use a tool by calling it with its arguments.
291291

292292
```python
293+
# !pip install smolagents[toolkit]
293294
from smolagents import DuckDuckGoSearchTool
294295

295296
search_tool = DuckDuckGoSearchTool()

docs/source/en/tutorials/inspect_runs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Here's how it then looks like on the platform:
3030
First install the required packages. Here we install [Phoenix by Arize AI](https://github.com/Arize-ai/phoenix) because that's a good solution to collect and inspect the logs, but there are other OpenTelemetry-compatible platforms that you could use for this collection & inspection part.
3131

3232
```shell
33-
pip install 'smolagents[telemetry]'
33+
pip install 'smolagents[telemetry,toolkit]'
3434
```
3535

3636
Then run the collector in the background.

examples/open_deep_research/visual_vs_text_browser.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"metadata": {},
1616
"outputs": [],
1717
"source": [
18-
"!pip install \"smolagents[litellm]\" -q"
18+
"!pip install \"smolagents[litellm,toolkit]\" -q"
1919
]
2020
},
2121
{

pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ dependencies = [
1818
"jinja2>=3.1.4",
1919
"pillow>=10.0.1", # Security fix for CVE-2023-4863: https://pillow.readthedocs.io/en/stable/releasenotes/10.0.1.html
2020
"markdownify>=0.14.1",
21-
"duckduckgo-search>=6.3.7",
2221
"python-dotenv"
2322
]
2423

@@ -65,6 +64,9 @@ telemetry = [
6564
"opentelemetry-exporter-otlp",
6665
"openinference-instrumentation-smolagents>=0.1.4"
6766
]
67+
toolkit = [
68+
"duckduckgo-search>=6.3.7", # DuckDuckGoSearchTool
69+
]
6870
transformers = [
6971
"accelerate",
7072
"transformers>=4.0.0",
@@ -79,7 +81,7 @@ vllm = [
7981
"torch"
8082
]
8183
all = [
82-
"smolagents[audio,docker,e2b,gradio,litellm,mcp,mlx-lm,openai,telemetry,transformers,vision,bedrock]",
84+
"smolagents[audio,docker,e2b,gradio,litellm,mcp,mlx-lm,openai,telemetry,toolkit,transformers,vision,bedrock]",
8385
]
8486
quality = [
8587
"ruff>=0.9.0",

0 commit comments

Comments
 (0)