Skip to content

Fix incorrect implementation of the DuckDuckGoSearchTool in code_agents - #773

Open
AnshuSarkarANX wants to merge 1 commit into
huggingface:mainfrom
AnshuSarkarANX:patch-1
Open

AnshuSarkarANX wants to merge 1 commit into
huggingface:mainfrom
AnshuSarkarANX:patch-1

Conversation

@AnshuSarkarANX

@AnshuSarkarANX AnshuSarkarANX commented Nov 12, 2026 •

Copy link
Copy Markdown

The implementation of the DuckDuckGoSearchTool is wrong in units/en/unit2/smolagents/code_agents.mdx.

Currently it is passed directly in Tools
CodeAgent(tools=[DuckDuckGoSearchTool()], model=InferenceClientModel())

The correct implementation is
web_search = DuckDuckGoSearchTool(max_results=5, rate_limit=2.0)
and then pass the web_search in tools.
PS: I've updated the code for all the languages.

Source: docs/smolagents/v1.26.0/en/reference/default_tools
https://huggingface.co/docs/smolagents/v1.26.0/en/reference/default_tools#smolagents.DuckDuckGoSearchTool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant