langchain/libs/community/tests/integration_tests
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.
2024-03-08 20:33:22 +00:00
..
adapters
callbacks infra: add print rule to ruff (#16221) 2024-02-09 16:13:30 -08:00
chat_message_histories infra: add -p to mkdir in lint steps (#17013) 2024-02-05 11:22:06 -08:00
chat_models community[minor]: Integration for Friendli LLM and ChatFriendli ChatModel. (#17913) 2024-03-08 02:20:47 +00:00
document_loaders community[patch]: move pdf text tests to integration (#18746) 2024-03-07 10:34:22 -08:00
embeddings community[patch]: Voyage AI updates default model and batch size (#17655) 2024-03-01 10:22:24 -08:00
examples infra: add print rule to ruff (#16221) 2024-02-09 16:13:30 -08:00
graphs Remove neo4j bloom labels from graph schema (#18564) 2024-03-05 12:54:05 -08:00
indexes community: Add document manager and mongo document manager (#17320) 2024-02-23 21:32:52 -05:00
llms community[minor]: Integration for Friendli LLM and ChatFriendli ChatModel. (#17913) 2024-03-08 02:20:47 +00:00
retrievers community[patch]: Fixing embedchain document mapping (#18255) 2024-02-29 14:54:37 -08:00
storage community[minor]: Add async methods to the AstraDB BaseStore (#16872) 2024-02-19 10:11:49 -08:00
tools community[minor]: Connery Tool and Toolkit (#14506) 2024-01-29 12:45:03 -08:00
utilities community[patch]: Add Passio Nutrition AI Food Search Tool to Community Package (#18278) 2024-03-08 20:33:22 +00:00
vectorstores community[patch]: Add pgvector to docker compose and update settings used in integration test (#18815) 2024-03-08 14:39:28 -05:00
__init__.py
.env.example community[minor]: add Kinetica LLM wrapper (#17879) 2024-02-22 16:02:00 -08:00
conftest.py
test_compile.py