Skip to content

Remove duckduckgo-search as required dependency #1271

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

Conversation

albertvillanova
Copy link
Member

@albertvillanova albertvillanova commented Apr 30, 2025

Remove duckduckgo-search as required dependency.

This PR decouples the DuckDuckGo search tool from the core package.

  • Reduce the install footprint for users who don't need the web search tool or prefer an alternative
  • Keep core package lean and focused

Additionally, note that duckduckgo-search depends on lxml, that is not a pure-Python package. This is problematic for the Wasm executor:

Copy link
Collaborator

@aymeric-roucher aymeric-roucher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we consider this tool as essential given that it will often be useful? It's in the readme example.

@albertvillanova
Copy link
Member Author

albertvillanova commented Apr 30, 2025

Thanks for the feedback!

My idea with this PR was to offer an AI agent framework that's as smol as possible, allowing users to customize and extend it based on their specific needs. In particular, web search might not be required for all use cases, and some users may prefer to bring their own implementation.

That said, I see your point: some basic functionality should be easy to opt into for convenience.

How about we offer an installation extra (e.g., "web-search", or "web", or "web-tools", or "default", or "default-tools", or "base-kit", or "toolkit", or "toolbox", or "essentials", or...) that includes this and other default tools along with their dependencies? That way, we keep the core lean while still making it easy to get started with common use cases.

@albertvillanova
Copy link
Member Author

I am finally creating the "toolkit" extra. Please note this change is provisional and can be reverted or renamed in a subsequent PR.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@albertvillanova albertvillanova merged commit 0dfac36 into huggingface:main May 2, 2025
4 checks passed
@albertvillanova albertvillanova deleted the remove-duckduckgo-dep branch May 2, 2025 14:03
@aymeric-roucher
Copy link
Collaborator

@albertvillanova I still think that installing a specific set of dependencies shouldn't be required to access basic search functionality is not great : created this issue #1295 to track it

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.

3 participants