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/libs/community/langchain_community/tools
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.
4 months ago
..
ainetwork community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
amadeus community[patch]: Improve amadeus tool and doc (#18509) 4 months ago
arxiv docs: docstrings `langchain_community` update (#14889) 7 months ago
azure_cognitive_services docs: docstrings `langchain_community` update (#14889) 7 months ago
bearly infra: add print rule to ruff (#16221) 5 months ago
bing_search community[patch]: Update bing results tool name (#16395) 5 months ago
brave_search community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
clickup community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
cogniswitch community[minor]: CogniSwitch Agent Toolkit for LangChain (#17312) 4 months ago
connery community[minor]: Connery Tool and Toolkit (#14506) 5 months ago
dataforseo_api_search community[patch]: Fixed tool names snake_case (#16397) 5 months ago
ddg_search community[patch]: Fixed tool names snake_case (#16397) 5 months ago
e2b_data_analysis Fix: Use `Union` instead of `|` to improve compatibility, fix #15244 (#15245) 6 months ago
edenai community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
eleven_labs community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
file_management community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
github community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
gitlab community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
gmail community[patch]: added latin-1 decoder to gmail search tool (#18116) 4 months ago
golden_query community[patch]: Fixed tool names snake_case (#16397) 5 months ago
google_cloud community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
google_finance community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
google_jobs community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
google_lens community[patch]: Fixed tool names snake_case (#16397) 5 months ago
google_places community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
google_scholar community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
google_search community[patch]: Fixed tool names snake_case (#16397) 5 months ago
google_serper community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
google_trends community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
graphql community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
human infra: add print rule to ruff (#16221) 5 months ago
interaction community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
jira community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
json community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
memorize community[patch]: Fixed tool names snake_case (#16397) 5 months ago
merriam_webster community[patch]: Fixed tool names snake_case (#16397) 5 months ago
metaphor_search exa: init pkg (#16553) 5 months ago
multion infra: add print rule to ruff (#16221) 5 months ago
nasa community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
nuclia community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
office365 infra: add print rule to ruff (#16221) 5 months ago
openapi community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
openweathermap community[patch]: Fixed tool names snake_case (#16397) 5 months ago
passio_nutrition_ai community[patch]: Add Passio Nutrition AI Food Search Tool to Community Package (#18278) 4 months ago
playwright community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
polygon community: Add PolygonFinancials Tool (#18324) 4 months ago
powerbi community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
pubmed community[patch]: Fixed tool names snake_case (#16397) 5 months ago
reddit_search community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
requests Add dangerous parameter to requests tool (#18697) 4 months ago
scenexplain community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
searchapi community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
searx_search community[patch]: Fixed tool names snake_case (#16397) 5 months ago
semanticscholar community: Semanticscholar tool to search 200M+ scientific articles (#15151) 6 months ago
shell infra: add print rule to ruff (#16221) 5 months ago
slack langchain-community: fix unicode escaping issue with SlackToolkit (#16616) 5 months ago
sleep community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
spark_sql community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
sql_database community[patch]: compatibility with SQLAlchemy 1.4.x (#17954) 4 months ago
stackexchange community[patch]: Fixed tool names snake_case (#16397) 5 months ago
steam community[patch]: Fixed tool names snake_case (#16397) 5 months ago
steamship_image_generation community[patch]: Fixed tool names snake_case (#16397) 5 months ago
tavily_search add defaults for tavily (#15075) 6 months ago
vectorstore community[patch]: Fix VectorStoreQATool (#18529) 4 months ago
wikidata community: Wikidata tool support (#16691) 5 months ago
wikipedia community[patch]: Fixed tool names snake_case (#16397) 5 months ago
wolfram_alpha community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
you community: Add you.com tool, add async to retriever, add async testing, add You tool doc (#18032) 4 months ago
youtube community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
zapier community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
__init__.py community: Add you.com tool, add async to retriever, add async testing, add You tool doc (#18032) 4 months ago
convert_to_openai.py core[patch], community[patch], openai[patch]: consolidate openai tool… (#16485) 5 months ago
ifttt.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
plugin.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago
render.py core[patch], community[patch], openai[patch]: consolidate openai tool… (#16485) 5 months ago
yahoo_finance_news.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 7 months ago