langchain/libs/community/langchain_community/utilities
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
..
__init__.py community[patch]: Add Passio Nutrition AI Food Search Tool to Community Package (#18278) 2024-03-08 20:33:22 +00:00
alpha_vantage.py
anthropic.py
apify.py
arcee.py
arxiv.py community[minor]: Implement lazy_load() for ArxivLoader (#18664) 2024-03-06 09:16:49 -05:00
astradb.py community: Add async methods to AstraDBCache (#17415) 2024-02-14 23:10:08 -05:00
awslambda.py
bibtex.py
bing_search.py
brave_search.py
clickup.py infra: add print rule to ruff (#16221) 2024-02-09 16:13:30 -08:00
dalle_image_generator.py
dataforseo_api_search.py
duckduckgo_search.py
github.py community[patch]: Fix github search issues and PRs PaginatedList has no len() error (#16806) 2024-02-12 19:50:59 -08:00
gitlab.py
golden_query.py
google_finance.py
google_jobs.py
google_lens.py infra: add print rule to ruff (#16221) 2024-02-09 16:13:30 -08:00
google_places_api.py
google_scholar.py
google_search.py
google_serper.py
google_trends.py
graphql.py community[patch]: Allow override of 'fetch_schema_from_transport' in the GraphQL tool (#17649) 2024-02-21 15:32:43 -08:00
jira.py
max_compute.py
merriam_webster.py
metaphor_search.py
nasa.py
nvidia_riva.py infra: add print rule to ruff (#16221) 2024-02-09 16:13:30 -08:00
opaqueprompts.py
openapi.py
openweathermap.py
outline.py
passio_nutrition_ai.py community[patch]: Add Passio Nutrition AI Food Search Tool to Community Package (#18278) 2024-03-08 20:33:22 +00:00
pebblo.py community[minor]: Add pebblo safe document loader (#16862) 2024-02-12 21:56:12 -08:00
polygon.py community: Add PolygonFinancials Tool (#18324) 2024-02-29 10:56:05 -08:00
portkey.py
powerbi.py
pubmed.py infra: add print rule to ruff (#16221) 2024-02-09 16:13:30 -08:00
python.py
reddit_search.py
redis.py
requests.py community[patch]: Fix GenericRequestsWrapper _aget_resp_content must be async (#18065) 2024-02-25 19:07:07 -08:00
scenexplain.py
searchapi.py
searx_search.py infra: add print rule to ruff (#16221) 2024-02-09 16:13:30 -08:00
semanticscholar.py
serpapi.py
spark_sql.py
sql_database.py community[minor]: Add lazy_table_reflection param to SqlDatabase (#18742) 2024-03-08 14:10:23 -05:00
stackexchange.py
steam.py
tavily_search.py
tensorflow_datasets.py
twilio.py
vertexai.py
wikidata.py
wikipedia.py community[minor]: Implement lazy_load() for WikipediaLoader (#18680) 2024-03-06 13:03:21 -05:00
wolfram_alpha.py
you.py community: Add you.com tool, add async to retriever, add async testing, add You tool doc (#18032) 2024-03-03 14:30:05 -08:00
zapier.py