You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/docs
Ishani Vyas 2b0cbd65ba
community[patch]: Add Passio Nutrition AI Food Search Tool to Community Package (#18278)
## Add Passio Nutrition AI Food Search Tool to Community Package

### Description
We propose adding a new tool to the `community` package, enabling
integration with Passio Nutrition AI for food search functionality. This
tool will provide a simple interface for retrieving nutrition facts
through the Passio Nutrition AI API, simplifying user access to
nutrition data based on food search queries.

### Implementation Details
- **Class Structure:** Implement `NutritionAI`, extending `BaseTool`. It
includes an `_run` method that accepts a query string and, optionally, a
`CallbackManagerForToolRun`.
- **API Integration:** Use `NutritionAIAPI` for the API wrapper,
encapsulating all interactions with the Passio Nutrition AI and
providing a clean API interface.
- **Error Handling:** Implement comprehensive error handling for API
request failures.

### Expected Outcome
- **User Benefits:** Enable easy querying of nutrition facts from Passio
Nutrition AI, enhancing the utility of the `langchain_community` package
for nutrition-related projects.
- **Functionality:** Provide a straightforward method for integrating
nutrition information retrieval into users' applications.

### Dependencies
- `langchain_core` for base tooling support
- `pydantic` for data validation and settings management
- Consider `requests` or another HTTP client library if not covered by
`NutritionAIAPI`.

### Tests and Documentation
- **Unit Tests:** Include tests that mock network interactions to ensure
tool reliability without external API dependency.
- **Documentation:** Create an example notebook in
`docs/docs/integrations/tools/passio_nutrition_ai.ipynb` showing usage,
setup, and example queries.

### Contribution Guidelines Compliance
- Adhere to the project's linting and formatting standards (`make
format`, `make lint`, `make test`).
- Ensure compliance with LangChain's contribution guidelines,
particularly around dependency management and package modifications.

### Additional Notes
- Aim for the tool to be a lightweight, focused addition, not
introducing significant new dependencies or complexity.
- Potential future enhancements could include caching for common queries
to improve performance.

### Twitter Handle
- Here is our Passio AI [twitter handle](https://twitter.com/@passio_ai)
where we announce our products.


If no one reviews your PR within a few days, please @-mention one of
baskaryan, efriis, eyurtsev, hwchase17.
7 months ago
..
api_reference community[patch], langchain[minor]: Add retriever self_query and score_threshold in DingoDB (#18106) 7 months ago
data 👥 Update LangChain people data (#18473) 7 months ago
docs community[patch]: Add Passio Nutrition AI Food Search Tool to Community Package (#18278) 7 months ago
scripts infra: add print rule to ruff (#16221) 8 months ago
src docs[minor]: Add thumbs up/down to all docs pages (#18526) 7 months ago
static docs: Add main graph documentation (#18021) 7 months ago
.gitignore docs: update func calling doc (#18300) 7 months ago
.local_build.sh docs: partner packages (#16960) 8 months ago
.yarnrc.yml docs[minor]: Add thumbs up/down to all docs pages (#18526) 7 months ago
README.md docs: developer docs (#14776) 10 months ago
babel.config.js Restructure docs (#11620) 12 months ago
code-block-loader.js Restructure docs (#11620) 12 months ago
docusaurus.config.js docs: logo (#17972) 7 months ago
package-lock.json docs[patch]: search experiment (#14254) 10 months ago
package.json docs[minor]: Add thumbs up/down to all docs pages (#18526) 7 months ago
settings.ini Restructure docs (#11620) 12 months ago
sidebars.js docs: `Toolkits` menu (#16217) 8 months ago
vercel.json docs: Add main graph documentation (#18021) 7 months ago
vercel_build.sh docs: add LangGraph (#15682) 9 months ago
vercel_requirements.txt infra: docs build install community editable (#14739) 10 months ago
yarn.lock docs[minor]: Add thumbs up/down to all docs pages (#18526) 7 months ago

README.md

LangChain Documentation

For more information on contributing to our documentation, see the Documentation Contributing Guide