fix: declare wolframalpha as a project dependency#58
Open
obchain wants to merge 1 commit into
Open
Conversation
`src/opendeepsearch/wolfram_tool.py` does `import wolframalpha` at module top, but the package is not declared in `pyproject.toml` or `requirements.txt` and is not pulled transitively by any existing dependency. Anyone following the README's "ReAct agent with math and search tools" example hits `ModuleNotFoundError: No module named 'wolframalpha'` before the example reaches its first agent step. Add `wolframalpha>=5.0.0` to both dependency lists, mirroring how the other tool-side packages (`smolagents`, `gradio`, `wikipedia-api`) are declared. Fixes sentient-agi#57
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.
What
Add
wolframalpha>=5.0.0topyproject.toml[project].dependenciesandrequirements.txt.Why
src/opendeepsearch/wolfram_tool.py:2does:but
wolframalphais not declared as a project dependency and is not pulled in transitively. The README's "ReAct agent with math and search tools" example (aroundWolframAlphaTool(app_id=...)) is the headline use case for this module, so following the README out of the box fails with:before any agent step runs.
Fixes #57
How
pyproject.toml: append"wolframalpha>=5.0.0"to the inlinedependencies = [...]array (keeping the existing single-line style)requirements.txt: addwolframalpha>=5.0.0next to the other tool-side packages (smolagents,gradio,wikipedia-api)5.0.0is the current stable line on PyPI and the API surfaceWolframAlphaTooluses (Client(app_id).query(...).pods[*].subpods[*].plaintext) has been stable across the 5.x series.I did not move
wolframalphato a[project.optional-dependencies]extra. The README treats it as a first-class example without anypip install opendeepsearch[wolfram]step, and the other tool-side packages (smolagents,gradio,wikipedia-api) are declared as base deps for the same reason. Happy to refactor into an extra if you'd prefer.Testing
python3 -c "import tomllib; assert 'wolframalpha>=5.0.0' in tomllib.loads(open('pyproject.toml','rb').read().decode())['project']['dependencies']"— passgrep -n wolframalpha requirements.txt—wolframalpha>=5.0.0uv pip install -e .on a clean venv,python -c "from opendeepsearch.wolfram_tool import WolframAlphaTool; print(WolframAlphaTool)"succeeds where it previously raisedModuleNotFoundError.