8000 Implement SimpleWebSearchTool by albertvillanova · Pull Request #1300 · huggingface/smolagents · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Implement SimpleWebSearchTool #1300

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 7, 2025

Conversation

albertvillanova
Copy link
Member
@albertvillanova albertvillanova commented May 6, 2025

Implement SimpleWebSearchTool without 3rd-party dependencies:

  • I used HTMLParser, that is a little verbose

Close #1295

Currently, it uses DuckDuckGo search provider, but it could be extended to use Bing (and others).

The name could also be:

  • StandaloneWebSearchTool
  • NativeWebSearchTool
  • DefaultWebSearchTool
  • LightweightWebSearchTool

CC: @aymeric-roucher
Note that the anti-bot protection was not triggered during my tests using Colab (while it was triggered when testing locally).

@aymeric-roucher
Copy link
Collaborator

Thank you @albertvillanova ! So you said here that bot detector could be triggered in this duckduckgo search, wouldn't it be better to use Bing by default then?

@albertvillanova
Copy link
Member Author
albertvillanova commented May 7, 2025

@aymeric-roucher both DuckDuckGo and Bing can trigger the anti-bot protection.

I finally could test both in Colab without triggering it.

So, it seems randomly triggered in both cases.

Indeed, I was thinking that we could use both (DuckDuckGo, Bing, and possibly others in the future) with an additional param (engine), and round-robin in case the anti-bot is triggered.

  • That is why I named it in a generic way and not mentioning the specific used search engine

I was thinking of implementing this in a future PR, and I implemented first DuckDuckGo, so we can make an equivalent replacement of DuckDuckGoSearchTool in all doc examples.

@aymeric-roucher
Copy link
Collaborator

Ok so let's go with DDG for now, thank you for implementing it, and nice job on finding a way to remove a core dependency!

@albertvillanova albertvillanova merged commit 36f1d44 into huggingface:main May 7, 2025
3 checks passed
@albertvillanova albertvillanova deleted the fix-1295 branch May 7, 2025 14:40
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.

Improve usability by enabling DDG search in the base package
2 participants
0