docs(cookbook): add missing ddgs dependency to smolagents integration#2880
Open
meatballg1210 wants to merge 1 commit intolangfuse:mainfrom
Open
docs(cookbook): add missing ddgs dependency to smolagents integration#2880meatballg1210 wants to merge 1 commit intolangfuse:mainfrom
meatballg1210 wants to merge 1 commit intolangfuse:mainfrom
Conversation
|
@meatballg1210 is attempting to deploy a commit to the langfuse Team on Vercel. A member of the Team first needs to authorize it. |
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
The smolagents integration notebook uses DuckDuckGoSearchTool in Step 4, but ddgs is not installed by smolagents[telemetry]. It belongs to the toolkit optional group in smolagents' pyproject.toml. This causes ModuleNotFoundError when users follow the notebook.
cbddfc9 to
9099951
Compare
Author
|
Hi maintainers 👋 Quick update: the CLA has been signed and that check is now passing . The remaining CI workflows and Vercel deployment still need approval from your side. It would be great if someone could approve them when you have a moment. Happy to make any changes if needed. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The smolagents integration notebook uses
DuckDuckGoSearchToolin Step 4,but the install command in Step 1 does not include the
ddgspackage.ddgsis listed under smolagents'toolkitoptional dependency group(see pyproject.toml),
not under
telemetry, so it is not installed bysmolagents[telemetry].This causes
ModuleNotFoundError: No module named 'ddgs'when users runDuckDuckGoSearchTool().Verification
Tested in a clean Google Colab environment:
ddgs:DuckDuckGoSearchTool()fails with ModuleNotFoundErrorddgsadded: works correctlyChanges
Added
ddgsto the pip install command in Step 1.Disclaimer: Experimental PR review
Greptile Summary
This PR adds
ddgsas an explicit dependency to the smolagents integration notebook's install step, fixing aModuleNotFoundErrorthat users hit when runningDuckDuckGoSearchTool()in Step 4. The fix is correct —ddgsis part ofsmolagents[toolkit], notsmolagents[telemetry], so it was never installed by the existing command.Confidence Score: 5/5
Safe to merge — single-line dependency addition that fixes a confirmed runtime error for notebook users.
The change is minimal and targeted: one package added to one install cell. The fix is verified correct by the author and consistent with smolagents' published dependency structure. No logic or API changes introduced.
No files require special attention.
Important Files Changed
ddgsto the pip install command to satisfy theDuckDuckGoSearchTooldependency used later in the notebook.Sequence Diagram
sequenceDiagram participant User as Notebook User participant pip as pip install participant smolagents as smolagents[telemetry] participant ddgs as ddgs participant Tool as DuckDuckGoSearchTool User->>pip: %pip install ... smolagents[telemetry] ddgs pip->>smolagents: install telemetry extras pip->>ddgs: install ddgs (NEW) User->>Tool: DuckDuckGoSearchTool() ddgs-->>Tool: module available ✓ Tool-->>User: search resultsReviews (1): Last reviewed commit: "docs(cookbook): add missing ddgs depende..." | Re-trigger Greptile