Skip to content
Snippets Groups Projects
Unverified Commit c674a44b authored by Ishani Vyas's avatar Ishani Vyas Committed by GitHub
Browse files

Add Passio Nutrition AI Food Search Tool to LLAMA_index (#11621)

parent 4df87489
Branches
Tags
No related merge requests found
Showing
with 5148 additions and 0 deletions
llama_index/_static
.DS_Store
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
bin/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
etc/
include/
lib/
lib64/
parts/
sdist/
share/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
.ruff_cache
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
notebooks/
# IPython
profile_default/
ipython_config.py
# pyenv
.python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
pyvenv.cfg
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# Jetbrains
.idea
modules/
*.swp
# VsCode
.vscode
# pipenv
Pipfile
Pipfile.lock
# pyright
pyrightconfig.json
poetry_requirements(
name="poetry",
)
# CHANGELOG
## [0.1.2] - 2024-02-27
- Add maintainers and keywords from library.json (llamahub)
GIT_ROOT ?= $(shell git rev-parse --show-toplevel)
help: ## Show all Makefile targets.
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[33m%-30s\033[0m %s\n", $$1, $$2}'
format: ## Run code autoformatters (black).
pre-commit install
git ls-files | xargs pre-commit run black --files
lint: ## Run linters: pre-commit (black, ruff, codespell) and mypy
pre-commit install && git ls-files | xargs pre-commit run --show-diff-on-failure --files
test: ## Run tests via pytest.
pytest tests
watch-docs: ## Build and watch documentation.
sphinx-autobuild docs/ docs/_build/html --open-browser --watch $(GIT_ROOT)/llama_index/
# Passio Nutrition AI Tool
This tool connects to a Passio Nutrition AI account and allows an Agent to perform searches against a database of over 2.2M foods.
You will need to set up a search key using Passio Nutrition API,learn more here: https://www.passio.ai/nutrition-ai#nutrition-api-pricing
## Usage
Here's an example usage of the NutritionAIToolSpec.
```python
from llama_index.tools.passio_nutrition_ai import NutritionAIToolSpec
from llama_index.agent import OpenAIAgent
tool_spec = NutritionAIToolSpec(api_key="your-key")
agent = OpenAIAgent.from_tools(tool_spec.to_tool_list())
agent.chat("What is the nutritional value of an apple?")
agent.chat("I had a cobb salad for lunch, how many calories did I eat?")
```
`passio_nutrition_ai`: Search for foods and their micro nutrition results related to a query
This loader is designed to be used as a way to load data as a Tool in a Agent. See [here](https://github.com/emptycrown/llama-hub/tree/main) for examples.
%% Cell type:code id:a2408d6e-8e07-47e5-a7e3-daf3022a44de tags:
``` python
# Setup OpenAI Agent
import openai
import os
from dotenv import load_dotenv
load_dotenv()
openai_api_key = os.getenv("OPENAI_API_KEY")
openai.api_key = openai_api_key
from llama_index.agent.openai import OpenAIAgent
```
%% Cell type:code id:3e91e13e-d7da-47d1-8122-5e11bb1b5a5a tags:
``` python
from llama_index.tools.passio_nutrition_ai.base import NutritionAIToolSpec
nutritionai_subscription_key = os.getenv("NUTRITIONAI_SUBSCRIPTION_KEY")
```
%% Cell type:code id:cd53ab95 tags:
``` python
nutrition_ai_tool = NutritionAIToolSpec(api_key=nutritionai_subscription_key)
agent = OpenAIAgent.from_tools(
nutrition_ai_tool.to_tool_list(),
verbose=True,
)
```
%% Cell type:code id:6a8541ac tags:
``` python
print(agent.chat("I had chicken tikka masala for lunch. How good is that for me?"))
```
%% Output
Added user message to memory: I had chicken tikka masala for lunch. How good is that for me?
=== Calling Function ===
Calling function: nutrition_ai_search with args: {"query":"chicken tikka masala"}
Got output: {'results': [{'type': 'reference', 'displayName': 'Chicken Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala', 'scoredName': 'Chicken Tikka Masala', 'score': 1, 'displayNameScore': 1, 'brandName': '', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood0085239308349', 'resultId': 'openfood0085239308349', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 100}, 'name': '', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 142.8571014404297}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala', 'scoredName': 'Chicken Tikka Masala', 'score': 0.95, 'displayNameScore': 0.95, 'brandName': 'Wells Enterprises, Inc.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood5390003010973', 'resultId': 'openfood5390003010973', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 320}, 'name': 'meal', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 345.6000061035156}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala', 'scoredName': 'Chicken Tikka Masala', 'score': 0.95, 'displayNameScore': 0.95, 'brandName': 'Tesco plc', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood5054269267228', 'resultId': 'openfood5054269267228', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 450}, 'name': 'package', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 540}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala', 'scoredName': 'Chicken Tikka Masala', 'score': 0.95, 'displayNameScore': 0.95, 'brandName': 'Sharwoods', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood5000187114670', 'resultId': 'openfood5000187114670', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 375}, 'name': 'package', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 453.75}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala', 'scoredName': 'Chicken Tikka Masala', 'score': 0.95, 'displayNameScore': 0.95, 'brandName': "SUKHI'S GOURMET INDIAN FOOD.", 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood0767226447919', 'resultId': 'openfood0767226447919', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 140}, 'name': 'serving', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 179.9999542236328}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala', 'scoredName': 'Chicken Tikka Masala', 'score': 0.95, 'displayNameScore': 0.95, 'brandName': 'T.A.C.T. Holding, Inc.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood00989121', 'resultId': 'openfood00989121', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 454}, 'name': 'package', 'quantity': 1}, 'calories': 580}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala', 'scoredName': 'Chicken Tikka Masala', 'score': 0.95, 'displayNameScore': 0.95, 'brandName': 'EVOL.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211477023', 'resultId': '1603211477023', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 142}, 'name': 'burrito', 'quantity': 1}, 'calories': 269.79998779296875}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala', 'scoredName': 'Chicken Tikka Masala', 'score': 0.95, 'displayNameScore': 0.95, 'brandName': 'Star Markets Co.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211444746', 'resultId': '1603211444746', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 28.3}, 'name': 'oz', 'quantity': 1, 'suggestedQuantity': [10]}, 'calories': 379.219970703125}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala', 'scoredName': 'Chicken Tikka Masala', 'score': 0.95, 'displayNameScore': 0.95, 'brandName': "SUKHI'S", 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211442144', 'resultId': '1603211442144', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 28.27}, 'name': 'oz', 'quantity': 1, 'suggestedQuantity': [5.2]}, 'calories': 299.8881530761719}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala', 'scoredName': 'Chicken Tikka Masala', 'score': 0.95, 'displayNameScore': 0.95, 'brandName': 'Safeway, Inc.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211440951', 'resultId': '1603211440951', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 28.36}, 'name': 'oz', 'quantity': 1, 'suggestedQuantity': [11]}, 'calories': 358.75396728515625}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala', 'scoredName': 'Chicken Tikka Masala', 'score': 0.95, 'displayNameScore': 0.95, 'brandName': 'Ahold USA, Inc.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211387832', 'resultId': '1603211387832', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 28}, 'name': 'oz', 'quantity': 1, 'suggestedQuantity': [5]}, 'calories': 229.60000610351562}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala', 'scoredName': 'Chicken Tikka Masala', 'score': 0.95, 'displayNameScore': 0.95, 'brandName': 'Glencourt Inc.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211384069', 'resultId': '1603211384069', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 241}, 'name': 'tray', 'quantity': 1}, 'calories': 260.2799987792969}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala', 'scoredName': 'Chicken Tikka Masala', 'score': 0.95, 'displayNameScore': 0.95, 'brandName': 'Us-Nippon Meat Packers', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211383435', 'resultId': '1603211383435', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 28}, 'name': 'oz', 'quantity': 1, 'suggestedQuantity': [5]}, 'calories': 210}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala', 'scoredName': 'Chicken Tikka Masala', 'score': 0.95, 'displayNameScore': 0.95, 'brandName': 'CONTESSA', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211342300', 'resultId': '1603211342300', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 28.38}, 'name': 'oz', 'quantity': 1, 'suggestedQuantity': [10.5]}, 'calories': 318.84930419921875}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala', 'scoredName': 'Chicken Tikka Masala', 'score': 0.95, 'displayNameScore': 0.95, 'brandName': 'The Kroger Co.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211306659', 'resultId': '1603211306659', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 28.36}, 'name': 'oz', 'quantity': 1, 'suggestedQuantity': [11]}, 'calories': 330.6776123046875}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala', 'scoredName': 'Chicken Tikka Masala', 'score': 0.95, 'displayNameScore': 0.95, 'brandName': 'Wal-Mart Stores, Inc.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211276873', 'resultId': '1603211276873', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 335}, 'name': 'container', 'quantity': 1}, 'calories': 311.54998779296875}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala', 'scoredName': 'Chicken Tikka Masala', 'score': 0.95, 'displayNameScore': 0.95, 'brandName': 'Target Stores', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211257427', 'resultId': '1603211257427', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 28.57}, 'name': 'oz', 'quantity': 1, 'suggestedQuantity': [4.9]}, 'calories': 239.38803100585938}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala Mix', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala Mix', 'scoredName': 'Chicken Tikka Masala Mix', 'score': 0.9319047619047619, 'displayNameScore': 0.9319047619047619, 'brandName': '', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood8906064230044', 'resultId': 'openfood8906064230044', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 80}, 'name': 'package', 'quantity': 1}, 'calories': 325.6000061035156}}, {'type': 'reference', 'displayName': 'Wie Chicken Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Wie Chicken Tikka Masala', 'scoredName': 'Wie Chicken Tikka Masala', 'score': 0.9319047619047619, 'displayNameScore': 0.9319047619047619, 'brandName': '', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood4005009102478', 'resultId': 'openfood4005009102478', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 350}, 'name': 'package', 'quantity': 1, 'suggestedQuantity': [0.5]}, 'calories': 145.25}}, {'type': 'reference', 'displayName': 'Hot Chicken Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Hot Chicken Tikka Masala', 'scoredName': 'Hot Chicken Tikka Masala', 'score': 0.9319047619047619, 'displayNameScore': 0.9319047619047619, 'brandName': '', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood00776516', 'resultId': 'openfood00776516', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 200}, 'name': 'serving', 'quantity': 1}, 'calories': 284}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala Bowl', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala Bowl', 'scoredName': 'Chicken Tikka Masala Bowl', 'score': 0.927906976744186, 'displayNameScore': 0.927906976744186, 'brandName': '', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood0041415024151', 'resultId': 'openfood0041415024151', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 100}, 'name': '', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 134.27560424804688}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala Sauce', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala Sauce', 'scoredName': 'Chicken Tikka Masala Sauce', 'score': 0.924090909090909, 'displayNameScore': 0.924090909090909, 'brandName': 'Safeway, Inc.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211342703', 'resultId': '1603211342703', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 255}, 'name': 'tray', 'quantity': 1}, 'calories': 239.6999969482422}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala (Main)', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala (Main)', 'scoredName': 'Chicken Tikka Masala (Main)', 'score': 0.9204444444444443, 'displayNameScore': 0.9204444444444443, 'brandName': '', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood5054781137085', 'resultId': 'openfood5054781137085', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 400}, 'name': 'package', 'quantity': 1, 'suggestedQuantity': [0.5]}, 'calories': 266}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala Crowns', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala Crowns', 'scoredName': 'Chicken Tikka Masala Crowns', 'score': 0.9204444444444443, 'displayNameScore': 0.9204444444444443, 'brandName': 'The Kroger Co.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211285450', 'resultId': '1603211285450', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 25}, 'name': 'piece', 'quantity': 1, 'suggestedQuantity': [3]}, 'calories': 210}}, {'type': 'reference', 'displayName': 'Evol, Chicken Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Evol, Chicken Tikka Masala', 'scoredName': 'Evol, Chicken Tikka Masala', 'score': 0.9194139860139859, 'displayNameScore': 0.9194139860139859, 'brandName': 'Pinnacle Foods Group LLC', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211455071', 'resultId': '1603211455071', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 566}, 'name': 'bag', 'quantity': 1, 'suggestedQuantity': [0.5]}, 'calories': 299.97998046875}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala, Chicken', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala, Chicken', 'scoredName': 'Chicken Tikka Masala, Chicken', 'score': 0.9136170212765957, 'displayNameScore': 0.9136170212765957, 'brandName': 'LIDL', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1628606739622', 'resultId': '1628606739622', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 28.3}, 'name': 'oz', 'quantity': 1, 'suggestedQuantity': [10]}, 'calories': 311.29998779296875}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala, Chicken', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala, Chicken', 'scoredName': 'Chicken Tikka Masala, Chicken', 'score': 0.9136170212765957, 'displayNameScore': 0.9136170212765957, 'brandName': 'Target Stores', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211557019', 'resultId': '1603211557019', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 202.5}, 'name': 'cup', 'quantity': 1, 'suggestedQuantity': [0.67]}, 'calories': 191.30177307128906}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala, Chicken Tikka', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala, Chicken Tikka', 'scoredName': 'Chicken Tikka Masala, Chicken Tikka', 'score': 0.8962264150943396, 'displayNameScore': 0.8962264150943396, 'brandName': 'Tiller & Hatch, Co.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1628606774236', 'resultId': '1628606774236', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 283}, 'name': 'serving', 'quantity': 1}, 'calories': 390.53997802734375}}, {'type': 'reference', 'displayName': 'Vegan Chicken Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Vegan Chicken Tikka Masala', 'scoredName': 'Vegan Chicken Tikka Masala', 'score': 0.8890139860139858, 'displayNameScore': 0.8890139860139858, 'brandName': 'VEGETARIAN PLUS', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211549315', 'resultId': '1603211549315', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 28.4}, 'name': 'oz', 'quantity': 1, 'suggestedQuantity': [2.5]}, 'calories': 90.16999816894531}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala Soup, Chicken Tikka', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala Soup, Chicken Tikka', 'scoredName': 'Chicken Tikka Masala Soup, Chicken Tikka', 'score': 0.8844827586206896, 'displayNameScore': 0.8844827586206896, 'brandName': 'Whole Foods Market, Inc.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1628606752082', 'resultId': '1628606752082', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 245}, 'name': 'serving', 'quantity': 1}, 'calories': 240.10000610351562}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala Pouches, Chicken Tikka', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala Pouches, Chicken Tikka', 'scoredName': 'Chicken Tikka Masala Pouches, Chicken Tikka', 'score': 0.8757094929470073, 'displayNameScore': 0.8757094929470073, 'brandName': 'Deep Foods Inc.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1628606770699', 'resultId': '1628606770699', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 113}, 'name': 'serving', 'quantity': 1}, 'calories': 290.4100036621094}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala Kit, Chicken Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala Kit, Chicken Tikka Masala', 'scoredName': 'Chicken Tikka Masala Kit, Chicken Tikka Masala', 'score': 0.8678559782608695, 'displayNameScore': 0.8678559782608695, 'brandName': 'KRAFT HEINZ SAUCES & FROZEN', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211526033', 'resultId': '1603211526033', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 28}, 'name': 'oz', 'quantity': 1, 'suggestedQuantity': [3]}, 'calories': 199.9199981689453}}, {'type': 'reference', 'displayName': 'Tikka Masala Chicken', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Tikka Masala Chicken', 'scoredName': 'Tikka Masala Chicken', 'score': 0.7827000000000001, 'displayNameScore': 0.7827000000000001, 'brandName': '', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood5701410407001', 'resultId': 'openfood5701410407001', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 450}, 'name': 'package', 'quantity': 1}, 'calories': 670.5}}, {'type': 'reference', 'displayName': 'Tikka Masala Chicken', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Tikka Masala Chicken', 'scoredName': 'Tikka Masala Chicken', 'score': 0.7827000000000001, 'displayNameScore': 0.7827000000000001, 'brandName': 'Ahold Usa, Inc.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211336796', 'resultId': '1603211336796', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 350}, 'name': 'package', 'quantity': 1}, 'calories': 399}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala With Turmeric Rice, Chicken Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala With Turmeric Rice, Chicken Tikka Masala', 'scoredName': 'Chicken Tikka Masala With Turmeric Rice, Chicken Tikka Masala', 'score': 0.8383104378501763, 'displayNameScore': 0.8383104378501763, 'brandName': 'Amazon Fulfillment Services, Inc. - Consumables Private Brands', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1628606772116', 'resultId': '1628606772116', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 340}, 'name': 'serving (container)', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 459}}, {'type': 'synonym', 'displayName': 'Chicken Salad Wawa', 'stemmedDisplayName': '', 'shortName': 'creamy chicken salad', 'longName': 'Chicken Salad Wawa', 'scoredName': 'Chicken Salad', 'score': 0.8817191066997521, 'displayNameScore': 0.7651202614379086, 'brandName': 'WAWA', 'iconId': 'PRE0075', 'labelId': 'aea34d6a-9f6f-11ea-b4fc-d3aeabf2e08c', 'synonymId': '75d5d48a-7dd6-11eb-8ccb-ef37ca786ece', 'recipeId': '', 'referenceId': '1603211581514', 'resultId': '1603211581514', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 108}, 'name': 'container', 'quantity': 1}, 'calories': 129.60000610351562}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala With Basmati Rice, Chicken Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala With Basmati Rice, Chicken Tikka Masala', 'scoredName': 'Chicken Tikka Masala With Basmati Rice, Chicken Tikka Masala', 'score': 0.8398974358974357, 'displayNameScore': 0.8398974358974357, 'brandName': 'C. C. Creations, Ltd.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1628606797814', 'resultId': '1628606797814', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 350}, 'name': 'serving', 'quantity': 1}, 'calories': 371}}, {'type': 'reference', 'displayName': 'Chicken Tikka Masala With Basmati Rice, Chicken Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Tikka Masala With Basmati Rice, Chicken Tikka Masala', 'scoredName': 'Chicken Tikka Masala With Basmati Rice, Chicken Tikka Masala', 'score': 0.8398974358974357, 'displayNameScore': 0.8398974358974357, 'brandName': 'American Halal Company, Inc. ', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1628606772600', 'resultId': '1628606772600', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 283}, 'name': 'serving', 'quantity': 1}, 'calories': 299.97998046875}}, {'type': 'synonym', 'displayName': 'Chicken Salad, Hy-Vee', 'stemmedDisplayName': '', 'shortName': 'creamy chicken salad', 'longName': 'Chicken Salad, Hy-Vee', 'scoredName': 'Chicken Salad', 'score': 0.8817191066997521, 'displayNameScore': 0.7039868531468532, 'brandName': 'Hy-Vee, Inc.', 'iconId': 'PRE0075', 'labelId': 'aea34d6a-9f6f-11ea-b4fc-d3aeabf2e08c', 'synonymId': '75d5d48a-7dd6-11eb-8ccb-ef37ca786ece', 'recipeId': '', 'referenceId': '1603211581507', 'resultId': '1603211581507', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 210}, 'name': 'cup', 'quantity': 1, 'suggestedQuantity': [0.5]}, 'calories': 199.49998474121094}}, {'type': 'reference', 'displayName': 'Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Tikka Masala', 'scoredName': 'Tikka Masala', 'score': 0.8765333333333333, 'displayNameScore': 0.8765333333333333, 'brandName': '', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood5019503024203', 'resultId': 'openfood5019503024203', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 400}, 'name': 'package', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 388}}, {'type': 'reference', 'displayName': 'Tikka Masala', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Tikka Masala', 'scoredName': 'Tikka Masala', 'score': 0.8765333333333333, 'displayNameScore': 0.8765333333333333, 'brandName': 'The Kroger Co.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211333981', 'resultId': '1603211333981', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 240}, 'name': 'cup', 'quantity': 1, 'suggestedQuantity': [0.5]}, 'calories': 140.40000915527344}}, {'type': 'synonym', 'displayName': 'Chicken Salad, Willow Tree Poultry Farm, Inc.', 'stemmedDisplayName': '', 'shortName': 'creamy chicken salad', 'longName': 'Chicken Salad, Willow Tree Poultry Farm, Inc.', 'scoredName': 'Chicken Salad', 'score': 0.8817191066997521, 'displayNameScore': 0.661288152173913, 'brandName': 'Willow Tree Poultry Farm, Inc.', 'iconId': 'PRE0075', 'labelId': 'aea34d6a-9f6f-11ea-b4fc-d3aeabf2e08c', 'synonymId': '75d5d48a-7dd6-11eb-8ccb-ef37ca786ece', 'recipeId': '', 'referenceId': '1603211581515', 'resultId': '1603211581515', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 230}, 'name': 'cup', 'quantity': 1, 'suggestedQuantity': [0.5]}, 'calories': 330.04998779296875}}, {'type': 'synonym', 'displayName': ' Starkist Chicken Creations Chicken Salad', 'stemmedDisplayName': '', 'shortName': 'creamy chicken salad', 'longName': ' Starkist Chicken Creations Chicken Salad', 'scoredName': 'Chicken Salad', 'score': 0.8817191066997521, 'displayNameScore': 0.6877124982775251, 'brandName': 'StarKist Co.', 'iconId': 'PRE0075', 'labelId': 'aea34d6a-9f6f-11ea-b4fc-d3aeabf2e08c', 'synonymId': '75d5d48a-7dd6-11eb-8ccb-ef37ca786ece', 'recipeId': '', 'referenceId': '1603211581512', 'resultId': '1603211581512', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 74}, 'name': 'pouch', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 70.30000305175781}}, {'type': 'synonym', 'displayName': 'Chicken Or Turkey Salad, Made With Light Mayonnaise-Type Salad Dressing', 'stemmedDisplayName': '', 'shortName': 'creamy chicken salad', 'longName': 'Chicken Or Turkey Salad, Made With Light Mayonnaise-Type Salad Dressing', 'scoredName': 'Chicken Salad', 'score': 0.8817191066997521, 'displayNameScore': 0.7481664630479505, 'brandName': '', 'iconId': 'PRE0075', 'labelId': 'aea34d6a-9f6f-11ea-b4fc-d3aeabf2e08c', 'synonymId': '75d5d48a-7dd6-11eb-8ccb-ef37ca786ece', 'recipeId': '', 'referenceId': '1603211579942', 'resultId': '1603211579942', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 226}, 'name': 'cup', 'quantity': 0.5}, 'calories': 163.85000610351562}}, {'type': 'synonym', 'displayName': 'Heb Meal Simple, Rotisserie Chicken Salad', 'stemmedDisplayName': '', 'shortName': 'creamy chicken salad', 'longName': 'Heb Meal Simple, Rotisserie Chicken Salad', 'scoredName': 'Chicken Salad', 'score': 0.8817191066997521, 'displayNameScore': 0.6018217190829014, 'brandName': 'HEB LP', 'iconId': 'PRE0075', 'labelId': 'aea34d6a-9f6f-11ea-b4fc-d3aeabf2e08c', 'synonymId': '75d5d48a-7dd6-11eb-8ccb-ef37ca786ece', 'recipeId': '', 'referenceId': '1636377087138', 'resultId': '1636377087138', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 200}, 'name': 'cup', 'quantity': 0.5}, 'calories': 310}}, {'type': 'synonym', 'displayName': 'Archer Farms, Hatch Chile Chicken Salad', 'stemmedDisplayName': '', 'shortName': 'creamy chicken salad', 'longName': 'Archer Farms, Hatch Chile Chicken Salad', 'scoredName': 'Chicken Salad', 'score': 0.8817191066997521, 'displayNameScore': 0.6096256410256411, 'brandName': 'Target Stores', 'iconId': 'PRE0075', 'labelId': 'aea34d6a-9f6f-11ea-b4fc-d3aeabf2e08c', 'synonymId': '75d5d48a-7dd6-11eb-8ccb-ef37ca786ece', 'recipeId': '', 'referenceId': '1603211581513', 'resultId': '1603211581513', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 200}, 'name': 'cup', 'quantity': 1, 'suggestedQuantity': [0.5]}, 'calories': 250}}, {'type': 'synonym', 'displayName': 'Lasagna With Chicken Or Turkey', 'stemmedDisplayName': '', 'shortName': 'chicken lasagna', 'longName': 'Lasagna With Chicken Or Turkey', 'scoredName': 'Chicken Lasagna', 'score': 0.8150696099300334, 'displayNameScore': 0.6178499629103862, 'brandName': '', 'iconId': '1004611', 'labelId': 'e7265647-bf83-11ee-a741-3ea322ece7aa', 'synonymId': 'e726564a-bf83-11ee-a741-3ea322ece7aa', 'recipeId': '', 'referenceId': '1603211207674', 'resultId': '1603211207674', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 250}, 'name': 'cup', 'quantity': 1}, 'calories': 487.5}}, {'type': 'synonym', 'displayName': 'Soft Taco With Chicken And Beans', 'stemmedDisplayName': '', 'shortName': 'chicken taco', 'longName': 'Soft Taco With Chicken And Beans', 'scoredName': 'Chicken Taco', 'score': 0.8147054647507977, 'displayNameScore': 0.5807736465689797, 'brandName': '', 'iconId': 'BAK0371', 'labelId': '3ff67dce-cd55-11ea-ade5-9331bcff0e72', 'synonymId': '7a3c170a-7dd6-11eb-8ccb-7b2e436478c5', 'recipeId': '', 'referenceId': '1603211581798', 'resultId': '1603211581798', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 110}, 'name': 'cup', 'quantity': 1}, 'calories': 218.90000915527344}}, {'type': 'synonym', 'displayName': 'Fast Foods, Taco With Chicken, Lettuce And Cheese, Soft', 'stemmedDisplayName': '', 'shortName': 'chicken taco', 'longName': 'Fast Foods, Taco With Chicken, Lettuce And Cheese, Soft', 'scoredName': 'Chicken Taco', 'score': 0.8147054647507977, 'displayNameScore': 0.5269856640035998, 'brandName': '', 'iconId': 'BAK0371', 'labelId': '3ff67dce-cd55-11ea-ade5-9331bcff0e72', 'synonymId': '7a3c170a-7dd6-11eb-8ccb-7b2e436478c5', 'recipeId': '', 'referenceId': '1603211199494', 'resultId': '1603211199494', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 98}, 'name': 'each taco', 'quantity': 2}, 'calories': 370.44000244140625}}, {'type': 'recipe', 'displayName': 'Garden Salad With Chicken And Ranch Dressing', 'stemmedDisplayName': '', 'shortName': 'Garden Salad with Chicken and Ranch Dressing', 'longName': '', 'scoredName': 'Bbq Chicken Salad', 'score': 0.708320523594053, 'displayNameScore': 0.6026293600138004, 'brandName': '', 'iconId': '1001615', 'labelId': '0f7976ff-392b-11ec-a5ad-966f014fd40b', 'synonymId': '5eaefbb8-b9c5-11ee-9c96-12023e19a804', 'recipeId': 'd8a715d6-3c0d-11ec-b382-2a201cb157c2', 'referenceId': '', 'resultId': 'd8a715d6-3c0d-11ec-b382-2a201cb157c2', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 261.05}, 'name': 'serving', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 309.3480224609375}}], 'alternateNames': ['chicken lasagna', 'chicken taco', 'chicken caesar salad', 'creamy chicken salad', 'chicken lo mein', 'chicken wrap', 'chicken chili', 'garden salad with chicken', 'roasted chicken breast', 'breaded chicken slices']}
========================
The nutrition facts for Chicken Tikka Masala vary depending on the brand and portion size. Here are some examples:
1. Chicken Tikka Masala (140g serving) - 180 calories
2. Chicken Tikka Masala (320g meal) - 346 calories
3. Chicken Tikka Masala (450g package) - 540 calories
4. Chicken Tikka Masala (375g package) - 454 calories
5. Chicken Tikka Masala (142g burrito) - 270 calories
These values give you an idea of the calorie content in different servings of Chicken Tikka Masala. It's important to consider portion sizes and ingredients used in the preparation for a more accurate assessment of its nutritional value.
%% Cell type:code id:5dc87515 tags:
``` python
print(
agent.chat("I had eggs for breakfast. Give me nutritional information about that.")
)
```
%% Output
Added user message to memory: I had eggs for breakfast. Give me nutritional information about that.
=== Calling Function ===
Calling function: nutrition_ai_search with args: {"query":"eggs"}
Got output: {'results': [{'type': 'synonym', 'displayName': 'Egg, Whole, Cooked, Hard-Boiled', 'stemmedDisplayName': '', 'shortName': 'boiled eggs', 'longName': 'Egg, Whole, Cooked, Hard-Boiled', 'scoredName': 'Eggs', 'score': 1, 'displayNameScore': 0.8707579667644183, 'brandName': '', 'iconId': '1001222', 'labelId': '6fbc0d8f-25f7-11ec-a025-1a3f5d843ef0', 'synonymId': '3e93b530-92d8-11ee-931c-3edb8070abce', 'recipeId': '', 'referenceId': '1603211567715', 'resultId': '1603211567715', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 50}, 'name': 'large', 'quantity': 2}, 'calories': 155}}, {'type': 'synonym', 'displayName': 'Trader Joes Cage Free Fresh Hard Cooked Peeled Eggs', 'stemmedDisplayName': '', 'shortName': 'boiled eggs', 'longName': 'Trader Joes Cage Free Fresh Hard Cooked Peeled Eggs', 'scoredName': 'Eggs', 'score': 1, 'displayNameScore': 0.8805519792822789, 'brandName': "Trader Joe's", 'iconId': '1001222', 'labelId': '6fbc0d8f-25f7-11ec-a025-1a3f5d843ef0', 'synonymId': '3e93b530-92d8-11ee-931c-3edb8070abce', 'recipeId': '', 'referenceId': 'openfood00919098', 'resultId': 'openfood00919098', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 44}, 'name': 'egg', 'quantity': 1}, 'calories': 59.99998474121094}}, {'type': 'recipe', 'displayName': 'William Sonoma Farmers’ Market Scramble', 'stemmedDisplayName': '', 'shortName': 'william sonoma Farmers’ Market Scramble', 'longName': '', 'scoredName': 'Eggs Scrambled', 'score': 0.95025, 'displayNameScore': 0.7438717948717949, 'brandName': '', 'iconId': 'MEA0505', 'labelId': '77b141d8-8951-11ea-a893-cbbc2d60a2bb', 'synonymId': 'fb55e5c5-b557-11ee-9c96-12023e19a804', 'recipeId': 'b7d0491d-8fa0-11ec-9070-d61d101ba1a6', 'referenceId': '', 'resultId': 'b7d0491d-8fa0-11ec-9070-d61d101ba1a6', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 199.8}, 'name': 'serving', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 229.73070444673795}}, {'type': 'synonym', 'displayName': 'Egg Omelet Or Scrambled Egg With Milk, Made With Oil', 'stemmedDisplayName': '', 'shortName': 'scrambled eggs', 'longName': 'Egg Omelet Or Scrambled Egg With Milk, Made With Oil', 'scoredName': 'Eggs Scrambled', 'score': 0.9500068247024784, 'displayNameScore': 0.8956702150158687, 'brandName': '', 'iconId': 'MEA0505', 'labelId': '77b141d8-8951-11ea-a893-cbbc2d60a2bb', 'synonymId': 'fb55e5c5-b557-11ee-9c96-12023e19a804', 'recipeId': '', 'referenceId': '1603211581749', 'resultId': '1603211581749', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 61}, 'name': 'egg', 'quantity': 2}, 'calories': 219.60000610351562}}, {'type': 'synonym', 'displayName': 'Egg Omelet Or Scrambled Egg, From Fast Food / Restaurant', 'stemmedDisplayName': '', 'shortName': 'scrambled eggs', 'longName': 'Egg Omelet Or Scrambled Egg, From Fast Food / Restaurant', 'scoredName': 'Eggs Scrambled', 'score': 0.9500068247024784, 'displayNameScore': 0.8950510775760416, 'brandName': '', 'iconId': 'MEA0505', 'labelId': '77b141d8-8951-11ea-a893-cbbc2d60a2bb', 'synonymId': 'fb55e5c5-b557-11ee-9c96-12023e19a804', 'recipeId': '', 'referenceId': '1603211588557', 'resultId': '1603211588557', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 54}, 'name': 'medium egg', 'quantity': 2}, 'calories': 228.9600067138672}}, {'type': 'reference', 'displayName': 'Eggs', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Eggs', 'scoredName': 'Eggs', 'score': 0.35, 'displayNameScore': 0.35, 'brandName': "Eggland's Best, Inc.", 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'usda45227866', 'resultId': 'usda45227866', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 50}, 'name': 'egg', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 60}}, {'type': 'reference', 'displayName': 'Eggs', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Eggs', 'scoredName': 'Eggs', 'score': 0.35, 'displayNameScore': 0.35, 'brandName': 'Morrisons', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood5010251564836', 'resultId': 'openfood5010251564836', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 68}, 'name': 'serving', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 89}}, {'type': 'reference', 'displayName': 'Eggs', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Eggs', 'scoredName': 'Eggs', 'score': 0.35, 'displayNameScore': 0.35, 'brandName': 'MEIJER, INC.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood0713733815086', 'resultId': 'openfood0713733815086', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 50}, 'name': 'egg', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 70}}, {'type': 'reference', 'displayName': 'Eggs', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Eggs', 'scoredName': 'Eggs', 'score': 0.35, 'displayNameScore': 0.35, 'brandName': "Sam's Club", 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood0193968321239', 'resultId': 'openfood0193968321239', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 50}, 'name': 'serving (egg)', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 70}}, {'type': 'reference', 'displayName': 'Eggs', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Eggs', 'scoredName': 'Eggs', 'score': 0.35, 'displayNameScore': 0.35, 'brandName': 'Walmart', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood0078742127132', 'resultId': 'openfood0078742127132', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 56}, 'name': 'serving (egg)', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 44.85599899291992}}, {'type': 'reference', 'displayName': 'Eggs', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Eggs', 'scoredName': 'Eggs', 'score': 0.35, 'displayNameScore': 0.35, 'brandName': 'Hy Vee', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood0075450095425', 'resultId': 'openfood0075450095425', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 50}, 'name': 'serving (egg)', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 70}}, {'type': 'reference', 'displayName': 'Eggs', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Eggs', 'scoredName': 'Eggs', 'score': 0.35, 'displayNameScore': 0.35, 'brandName': 'Gray Ridge Egg Farm', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood0064767343053', 'resultId': 'openfood0064767343053', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 105}, 'name': 'serving (egg)', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 243.59999084472656}}, {'type': 'reference', 'displayName': 'Eggs', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Eggs', 'scoredName': 'Eggs', 'score': 0.35, 'displayNameScore': 0.35, 'brandName': 'Publix', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood0041415012660', 'resultId': 'openfood0041415012660', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 50}, 'name': 'serving', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 70}}, {'type': 'reference', 'displayName': 'Eggs', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Eggs', 'scoredName': 'Eggs', 'score': 0.35, 'displayNameScore': 0.35, 'brandName': 'CAL-MAINE FOODS, INC.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood0028621123984', 'resultId': 'openfood0028621123984', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 50}, 'name': 'serving (egg)', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 70}}, {'type': 'reference', 'displayName': 'Eggs', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Eggs', 'scoredName': 'Eggs', 'score': 0.35, 'displayNameScore': 0.35, 'brandName': '', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood0011110092434', 'resultId': 'openfood0011110092434', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 100}, 'name': '', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 60}}, {'type': 'reference', 'displayName': 'Eggs', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Eggs', 'scoredName': 'Eggs', 'score': 0.35, 'displayNameScore': 0.35, 'brandName': 'Mr. Beverages Old Time Cocktail Mixes', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211480195', 'resultId': '1603211480195', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 38}, 'name': 'egg', 'quantity': 1}, 'calories': 60.040000915527344}}, {'type': 'reference', 'displayName': 'Eggs', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Eggs', 'scoredName': 'Eggs', 'score': 0.35, 'displayNameScore': 0.35, 'brandName': 'Safeway, Inc.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211474477', 'resultId': '1603211474477', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 44}, 'name': 'egg', 'quantity': 1}, 'calories': 59.84000015258789}}, {'type': 'reference', 'displayName': 'Eggs', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Eggs', 'scoredName': 'Eggs', 'score': 0.35, 'displayNameScore': 0.35, 'brandName': 'SUN HARVEST', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211474226', 'resultId': '1603211474226', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 50}, 'name': 'egg', 'quantity': 1}, 'calories': 70}}, {'type': 'reference', 'displayName': 'Eggs', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Eggs', 'scoredName': 'Eggs', 'score': 0.35, 'displayNameScore': 0.35, 'brandName': 'Kreider Farms', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211473285', 'resultId': '1603211473285', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 56}, 'name': 'egg', 'quantity': 1}, 'calories': 80.08000183105469}}, {'type': 'reference', 'displayName': 'Eggs', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Eggs', 'scoredName': 'Eggs', 'score': 0.35, 'displayNameScore': 0.35, 'brandName': 'Oakdell Egg Farms, Inc.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211428806', 'resultId': '1603211428806', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 44}, 'name': 'egg', 'quantity': 1}, 'calories': 59.84000015258789}}, {'type': 'reference', 'displayName': 'Eggs', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Eggs', 'scoredName': 'Eggs', 'score': 0.35, 'displayNameScore': 0.35, 'brandName': "Raley's", 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211428441', 'resultId': '1603211428441', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 50}, 'name': 'egg', 'quantity': 1}, 'calories': 70}}, {'type': 'reference', 'displayName': 'Eggs', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Eggs', 'scoredName': 'Eggs', 'score': 0.35, 'displayNameScore': 0.35, 'brandName': "Pete and Gerry's Organics", 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211305959', 'resultId': '1603211305959', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 56}, 'name': 'egg', 'quantity': 1}, 'calories': 80.08000183105469}}, {'type': 'reference', 'displayName': 'Organic Eggs', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Organic Eggs', 'scoredName': 'Organic Eggs', 'score': 0.24466666666666662, 'displayNameScore': 0.24466666666666662, 'brandName': "Pete and Gerry's Organics", 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211305958', 'resultId': '1603211305958', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 56}, 'name': 'egg', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 80.08000183105469}}, {'type': 'reference', 'displayName': 'Brown Eggs', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Brown Eggs', 'scoredName': 'Brown Eggs', 'score': 0.2506, 'displayNameScore': 0.2506, 'brandName': 'THE HAPPY EGG CO', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211294697', 'resultId': '1603211294697', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 50}, 'name': 'egg', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 70}}, {'type': 'reference', 'displayName': 'Kirkland, Eggs', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Kirkland, Eggs', 'scoredName': 'Kirkland, Eggs', 'score': 0.16624999999999998, 'displayNameScore': 0.16624999999999998, 'brandName': 'Costco Companies Inc.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211503713', 'resultId': '1603211503713', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 56}, 'name': 'egg', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 80.08000183105469}}], 'alternateNames': ['boiled eggs', 'scrambled eggs', 'fried eggs', 'baked eggs', 'poached eggs', 'deviled eggs', 'raw eggs']}
========================
Here is the nutritional information for eggs:
- **Egg, Whole, Cooked, Hard-Boiled**
- Portion: 2 large eggs (50g each)
- Calories: 155
- **Trader Joe's Cage Free Fresh Hard Cooked Peeled Eggs**
- Portion: 1 egg (44g)
- Calories: 60
- **Egg Omelet Or Scrambled Egg With Milk, Made With Oil**
- Portion: 2 eggs (61g)
- Calories: 219.6
- **Egg Omelet Or Scrambled Egg, From Fast Food / Restaurant**
- Portion: 2 medium eggs (54g)
- Calories: 228.96
These are some variations of eggs with their respective calorie counts.
%% Cell type:code id:e1b8b2c1 tags:
``` python
print(agent.chat("I had a cobb salad for lunch, how many calories did I eat?"))
```
%% Output
Added user message to memory: I had a cobb salad for lunch, how many calories did I eat?
=== Calling Function ===
Calling function: nutrition_ai_search with args: {"query":"cobb salad"}
Got output: {'results': [{'type': 'synonym', 'displayName': 'Cobb Salad, No Dressing', 'stemmedDisplayName': '', 'shortName': 'cobb salad', 'longName': 'Cobb Salad, No Dressing', 'scoredName': 'Cobb Salad', 'score': 1, 'displayNameScore': 0.930208318211283, 'brandName': '', 'iconId': 'PRE0056', 'labelId': 'e219c51c-9f6e-11ea-84a8-438acb256141', 'synonymId': '76a2efb0-7dd6-11eb-8ccb-83d65b03681f', 'recipeId': '', 'referenceId': '1603211552882', 'resultId': '1603211552882', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 105}, 'name': 'cup', 'quantity': 2}, 'calories': 193.1999969482422}}, {'type': 'synonym', 'displayName': 'Meat Lovers Cobb Salad', 'stemmedDisplayName': '', 'shortName': 'cobb salad', 'longName': 'Meat Lovers Cobb Salad', 'scoredName': 'Cobb Salad', 'score': 1, 'displayNameScore': 0.8482639310416504, 'brandName': 'NOT A BRANDED ITEM', 'iconId': 'PRE0056', 'labelId': 'e219c51c-9f6e-11ea-84a8-438acb256141', 'synonymId': '76a2efb0-7dd6-11eb-8ccb-83d65b03681f', 'recipeId': '', 'referenceId': '1603211572453', 'resultId': '1603211572453', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 220}, 'name': 'cup', 'quantity': 1, 'suggestedQuantity': [0.5]}, 'calories': 170.5}}, {'type': 'synonym', 'displayName': 'Turkey & Bacon Cobb Salad, Cumberland Farms', 'stemmedDisplayName': '', 'shortName': 'cobb salad', 'longName': 'Turkey & Bacon Cobb Salad, Cumberland Farms', 'scoredName': 'Cobb Salad', 'score': 1, 'displayNameScore': 0.8419398562108725, 'brandName': 'CUMBERLAND FARMS', 'iconId': 'PRE0056', 'labelId': 'e219c51c-9f6e-11ea-84a8-438acb256141', 'synonymId': '76a2efb0-7dd6-11eb-8ccb-83d65b03681f', 'recipeId': '', 'referenceId': '1603211580609', 'resultId': '1603211580609', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 205}, 'name': 'container', 'quantity': 1}, 'calories': 289.04998779296875}}, {'type': 'synonym', 'displayName': 'Chicken & Bacon Cobb Salad', 'stemmedDisplayName': '', 'shortName': 'cobb salad', 'longName': 'Chicken & Bacon Cobb Salad', 'scoredName': 'Cobb Salad', 'score': 1, 'displayNameScore': 0.8376892069422205, 'brandName': 'NOT A BRANDED ITEM', 'iconId': 'PRE0056', 'labelId': 'e219c51c-9f6e-11ea-84a8-438acb256141', 'synonymId': '76a2efb0-7dd6-11eb-8ccb-83d65b03681f', 'recipeId': '', 'referenceId': '1603211572454', 'resultId': '1603211572454', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 264}, 'name': 'package', 'quantity': 1}, 'calories': 588.7200317382812}}, {'type': 'synonym', 'displayName': 'Organic Southwest Cobb Salad, Wild Oats Marketing, Llc', 'stemmedDisplayName': '', 'shortName': 'cobb salad', 'longName': 'Organic Southwest Cobb Salad, Wild Oats Marketing, Llc', 'scoredName': 'Cobb Salad', 'score': 1, 'displayNameScore': 0.8298778210942502, 'brandName': 'Wild Oats Marketing, LLC', 'iconId': 'PRE0056', 'labelId': 'e219c51c-9f6e-11ea-84a8-438acb256141', 'synonymId': '76a2efb0-7dd6-11eb-8ccb-83d65b03681f', 'recipeId': '', 'referenceId': '1603211580611', 'resultId': '1603211580611', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 397}, 'name': 'container', 'quantity': 1}, 'calories': 258.04998779296875}}, {'type': 'synonym', 'displayName': 'Hannaford Bros Chicken Cobb Salad', 'stemmedDisplayName': '', 'shortName': 'cobb salad', 'longName': 'Hannaford Bros Chicken Cobb Salad', 'scoredName': 'Cobb Salad', 'score': 1, 'displayNameScore': 0.8244169877410487, 'brandName': 'Hannaford Bros. Co.', 'iconId': 'PRE0056', 'labelId': 'e219c51c-9f6e-11ea-84a8-438acb256141', 'synonymId': '76a2efb0-7dd6-11eb-8ccb-83d65b03681f', 'recipeId': '', 'referenceId': '1603211580608', 'resultId': '1603211580608', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 199}, 'name': 'salad', 'quantity': 1}, 'calories': 179.10000610351562}}, {'type': 'synonym', 'displayName': 'Taylor Farms Cobb Salad', 'stemmedDisplayName': '', 'shortName': 'cobb salad', 'longName': 'Taylor Farms Cobb Salad', 'scoredName': 'Cobb Salad', 'score': 1, 'displayNameScore': 0.8239822312547613, 'brandName': 'Taylor Fresh Foods, Inc.', 'iconId': 'PRE0056', 'labelId': 'e219c51c-9f6e-11ea-84a8-438acb256141', 'synonymId': '76a2efb0-7dd6-11eb-8ccb-83d65b03681f', 'recipeId': '', 'referenceId': '1603211580614', 'resultId': '1603211580614', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 206}, 'name': 'package', 'quantity': 1}, 'calories': 290.4599914550781}}, {'type': 'synonym', 'displayName': 'Whole Foods Market, Cobb Salad', 'stemmedDisplayName': '', 'shortName': 'cobb salad', 'longName': 'Whole Foods Market, Cobb Salad', 'scoredName': 'Cobb Salad', 'score': 1, 'displayNameScore': 0.821303438902211, 'brandName': 'RT Wholesale, LLC.', 'iconId': 'PRE0056', 'labelId': 'e219c51c-9f6e-11ea-84a8-438acb256141', 'synonymId': '76a2efb0-7dd6-11eb-8ccb-83d65b03681f', 'recipeId': '', 'referenceId': '1603211580612', 'resultId': '1603211580612', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 28.41}, 'name': 'oz', 'quantity': 1, 'suggestedQuantity': [9.82]}, 'calories': 499.3852844238281}}, {'type': 'synonym', 'displayName': 'Archer Farms, Cobb Salad', 'stemmedDisplayName': '', 'shortName': 'cobb salad', 'longName': 'Archer Farms, Cobb Salad', 'scoredName': 'Cobb Salad', 'score': 1, 'displayNameScore': 0.8167613336390531, 'brandName': 'ARCHER FARMS', 'iconId': 'PRE0056', 'labelId': 'e219c51c-9f6e-11ea-84a8-438acb256141', 'synonymId': '76a2efb0-7dd6-11eb-8ccb-83d65b03681f', 'recipeId': '', 'referenceId': '1603211587568', 'resultId': '1603211587568', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 206}, 'name': 'salad', 'quantity': 1}, 'calories': 290.4599914550781}}, {'type': 'synonym', 'displayName': 'Marketside Ranch Cobb Salad', 'stemmedDisplayName': '', 'shortName': 'cobb salad', 'longName': 'Marketside Ranch Cobb Salad', 'scoredName': 'Cobb Salad', 'score': 1, 'displayNameScore': 0.8087533971311166, 'brandName': 'Wal-Mart Stores, Inc.', 'iconId': 'PRE0056', 'labelId': 'e219c51c-9f6e-11ea-84a8-438acb256141', 'synonymId': '76a2efb0-7dd6-11eb-8ccb-83d65b03681f', 'recipeId': '', 'referenceId': '1603211580610', 'resultId': '1603211580610', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 340}, 'name': 'container', 'quantity': 1, 'suggestedQuantity': [0.3]}, 'calories': 122.4000015258789}}, {'type': 'synonym', 'displayName': 'Lunds & Byerlys, Kobe Cobb Salad', 'stemmedDisplayName': '', 'shortName': 'cobb salad', 'longName': 'Lunds & Byerlys, Kobe Cobb Salad', 'scoredName': 'Cobb Salad', 'score': 1, 'displayNameScore': 0.8012613336390532, 'brandName': 'Byerly Foods International', 'iconId': 'PRE0056', 'labelId': 'e219c51c-9f6e-11ea-84a8-438acb256141', 'synonymId': '76a2efb0-7dd6-11eb-8ccb-83d65b03681f', 'recipeId': '', 'referenceId': '1603211580613', 'resultId': '1603211580613', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 354}, 'name': 'salad', 'quantity': 1}, 'calories': 548.7000122070312}}, {'type': 'synonym', 'displayName': 'Fish House Foods Company, Cobb Salad', 'stemmedDisplayName': '', 'shortName': 'cobb salad', 'longName': 'Fish House Foods Company, Cobb Salad', 'scoredName': 'Cobb Salad', 'score': 1, 'displayNameScore': 0.7943522427299622, 'brandName': 'Fish House Foods Company', 'iconId': 'PRE0056', 'labelId': 'e219c51c-9f6e-11ea-84a8-438acb256141', 'synonymId': '76a2efb0-7dd6-11eb-8ccb-83d65b03681f', 'recipeId': '', 'referenceId': '1603211587566', 'resultId': '1603211587566', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 28.37}, 'name': 'oz', 'quantity': 1, 'suggestedQuantity': [13.5]}, 'calories': 651.091552734375}}, {'type': 'synonym', 'displayName': 'A Along The Vine, Chicken & Bacon Cobb Salad', 'stemmedDisplayName': '', 'shortName': 'cobb salad', 'longName': 'A Along The Vine, Chicken & Bacon Cobb Salad', 'scoredName': 'Cobb Salad', 'score': 1, 'displayNameScore': 0.7838907042684238, 'brandName': 'A ALONG THE VINE', 'iconId': 'PRE0056', 'labelId': 'e219c51c-9f6e-11ea-84a8-438acb256141', 'synonymId': '76a2efb0-7dd6-11eb-8ccb-83d65b03681f', 'recipeId': '', 'referenceId': '1603211587567', 'resultId': '1603211587567', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 298}, 'name': 'salad', 'quantity': 1}, 'calories': 658.5800170898438}}, {'type': 'recipe', 'displayName': 'Homemade Shrimp Cobb Salad', 'stemmedDisplayName': '', 'shortName': 'Homemade shrimp cobb salad', 'longName': '', 'scoredName': 'Shrimp Cobb Salad', 'score': 0.916306936937167, 'displayNameScore': 0.7978272989281172, 'brandName': '', 'iconId': '1000593', 'labelId': 'c0a75458-e374-11eb-af23-e20d1afceae7', 'synonymId': 'c0a803b2-e374-11eb-b88a-f7731ca67b58', 'recipeId': 'e47cda8f-e5d6-11eb-b49c-3e0c4ccfa888', 'referenceId': '', 'resultId': 'e47cda8f-e5d6-11eb-b49c-3e0c4ccfa888', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 345.5}, 'name': 'serving', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 449.82000732421875}}, {'type': 'reference', 'displayName': 'Cobb Salad', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Cobb Salad', 'scoredName': 'Cobb Salad', 'score': 0.6, 'displayNameScore': 0.6, 'brandName': '', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood0681131457934', 'resultId': 'openfood0681131457934', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 149}, 'name': 'serving', 'quantity': 1}, 'calories': 239.88999938964844}}, {'type': 'reference', 'displayName': 'Cobb Salad', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Cobb Salad', 'scoredName': 'Cobb Salad', 'score': 0.6, 'displayNameScore': 0.6, 'brandName': 'Udi, The Sandwichman, Inc.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211560486', 'resultId': '1603211560486', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 363}, 'name': 'serving', 'quantity': 1}, 'calories': 631.6199951171875}}, {'type': 'reference', 'displayName': 'Cobb Salad', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Cobb Salad', 'scoredName': 'Cobb Salad', 'score': 0.6, 'displayNameScore': 0.6, 'brandName': 'Renaissance Food Group, LLC', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211477359', 'resultId': '1603211477359', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 234}, 'name': 'container', 'quantity': 1}, 'calories': 170.8199920654297}}, {'type': 'reference', 'displayName': 'Cobb Salad', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Cobb Salad', 'scoredName': 'Cobb Salad', 'score': 0.6, 'displayNameScore': 0.6, 'brandName': 'Mr. Beverages Old Time Cocktail Mixes', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211463512', 'resultId': '1603211463512', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 234}, 'name': 'package', 'quantity': 1}, 'calories': 259.739990234375}}, {'type': 'reference', 'displayName': 'Cobb Salad', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Cobb Salad', 'scoredName': 'Cobb Salad', 'score': 0.6, 'displayNameScore': 0.6, 'brandName': 'Entertainment Production House Inc.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211380325', 'resultId': '1603211380325', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 309}, 'name': 'package', 'quantity': 1}, 'calories': 398.6099853515625}}, {'type': 'reference', 'displayName': 'Cobb Salad', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Cobb Salad', 'scoredName': 'Cobb Salad', 'score': 0.6, 'displayNameScore': 0.6, 'brandName': 'Target Stores', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211274160', 'resultId': '1603211274160', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 206}, 'name': 'salad', 'quantity': 1}, 'calories': 290.4599914550781}}, {'type': 'synonym', 'displayName': 'Cornsalad, Raw', 'stemmedDisplayName': '', 'shortName': 'lambs lettuce', 'longName': 'Cornsalad, Raw', 'scoredName': 'Corn Salad', 'score': 0.8033989094956995, 'displayNameScore': 0.7139024592792491, 'brandName': '', 'iconId': 'VEG7693', 'labelId': '77ad5514-8951-11ea-a893-bb8db4091806', 'synonymId': '7fd2e84b-7df1-11eb-87be-b24b03f249d1', 'recipeId': '', 'referenceId': '1603211582210', 'resultId': '1603211582210', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 56}, 'name': 'cup', 'quantity': 1}, 'calories': 11.760000228881836}}, {'type': 'recipe', 'displayName': 'Tuna Nicoise Salad', 'stemmedDisplayName': '', 'shortName': 'tuna nicoise salad', 'longName': '', 'scoredName': 'Nicoise Salad', 'score': 0.8254111665310635, 'displayNameScore': 0.7718140969339939, 'brandName': '', 'iconId': 'PRE0068', 'labelId': '943c2910-9f6f-11ea-98eb-bbe90895d054', 'synonymId': '75a881ce-7dd6-11eb-8ccb-6f4a436efcc0', 'recipeId': 'c9f3fca0-e292-11ea-8e83-26ec6fac3df6', 'referenceId': '', 'resultId': 'c9f3fca0-e292-11ea-8e83-26ec6fac3df6', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 252.5}, 'name': 'serving', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 361.21002197265625}}, {'type': 'recipe', 'displayName': 'Garden Salad With Chicken And Ranch Dressing', 'stemmedDisplayName': '', 'shortName': 'Garden Salad with Chicken and Ranch Dressing', 'longName': '', 'scoredName': 'Bbq Chicken Salad', 'score': 0.856156862745098, 'displayNameScore': 0.6990734598734598, 'brandName': '', 'iconId': '1001615', 'labelId': '0f7976ff-392b-11ec-a5ad-966f014fd40b', 'synonymId': '5eaefbb8-b9c5-11ee-9c96-12023e19a804', 'recipeId': 'd8a715d6-3c0d-11ec-b382-2a201cb157c2', 'referenceId': '', 'resultId': 'd8a715d6-3c0d-11ec-b382-2a201cb157c2', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 261.05}, 'name': 'serving', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 309.3480224609375}}, {'type': 'reference', 'displayName': 'Cobb Style Salad', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Cobb Style Salad', 'scoredName': 'Cobb Style Salad', 'score': 0.57, 'displayNameScore': 0.57, 'brandName': '', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood0011110602329', 'resultId': 'openfood0011110602329', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 100}, 'name': '', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 14.300000190734863}}, {'type': 'reference', 'displayName': 'Cobb Chicken Salad', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Cobb Chicken Salad', 'scoredName': 'Cobb Chicken Salad', 'score': 0.563076923076923, 'displayNameScore': 0.563076923076923, 'brandName': '', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood0762535022987', 'resultId': 'openfood0762535022987', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 100}, 'name': '', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 118.7135009765625}}, {'type': 'recipe', 'displayName': 'Caesar Salad With Salmon', 'stemmedDisplayName': '', 'shortName': 'caesar salad with salmon', 'longName': '', 'scoredName': 'Salmon Caesar Salad', 'score': 0.7485789670506343, 'displayNameScore': 0.7474248985460394, 'brandName': '', 'iconId': 'PRE0063', 'labelId': '2d64d7aa-9f6f-11ea-aace-effb8c80e76b', 'synonymId': '789a3ac6-7dd6-11eb-8ccb-db42f285b7d2', 'recipeId': '73f285bc-dcef-11ea-8a18-620f5f69b907', 'referenceId': '', 'resultId': '73f285bc-dcef-11ea-8a18-620f5f69b907', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 255}, 'name': 'serving', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 406.97998046875}}, {'type': 'reference', 'displayName': 'Cobb Salad With Chicken', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Cobb Salad With Chicken', 'scoredName': 'Cobb Salad With Chicken', 'score': 0.5465469845722299, 'displayNameScore': 0.5465469845722299, 'brandName': 'Taylor Fresh Foods, Inc.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211381432', 'resultId': '1603211381432', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 305}, 'name': 'salad', 'quantity': 1}, 'calories': 451.3999938964844}}, {'type': 'reference', 'displayName': 'Southern Cobb Salad', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Southern Cobb Salad', 'scoredName': 'Southern Cobb Salad', 'score': 0.5433263157894735, 'displayNameScore': 0.5433263157894735, 'brandName': 'Publix', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood0298864307995', 'resultId': 'openfood0298864307995', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 542}, 'name': 'serving', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 77}}, {'type': 'reference', 'displayName': 'Colorado Cobb Salad', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Colorado Cobb Salad', 'scoredName': 'Colorado Cobb Salad', 'score': 0.5325136842105263, 'displayNameScore': 0.5325136842105263, 'brandName': '', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood0710859383697', 'resultId': 'openfood0710859383697', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 340}, 'name': 'serving', 'quantity': 1}, 'calories': 449.9998779296875}}, {'type': 'recipe', 'displayName': 'Celery Salad With Dates, Almonds And Parmesan', 'stemmedDisplayName': '', 'shortName': 'Celery Salad with Dates, Almonds and Parmesan', 'longName': '', 'scoredName': 'Celery Salad', 'score': 0.7195266605458763, 'displayNameScore': 0.6431548366465052, 'brandName': '', 'iconId': '1001225', 'labelId': '818089d2-25ff-11ec-9051-1a845e38ff23', 'synonymId': '81812bd2-25ff-11ec-ba9f-27843c256eb8', 'recipeId': '1ba40c49-3bec-11ec-ab8c-661d52839eeb', 'referenceId': '', 'resultId': '1ba40c49-3bec-11ec-ab8c-661d52839eeb', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 797.7}, 'name': 'serving', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 1346.97509765625}}, {'type': 'reference', 'displayName': 'Cobb Salad With Turkey & Bacon', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Cobb Salad With Turkey & Bacon', 'scoredName': 'Cobb Salad With Turkey & Bacon', 'score': 0.5288421052631578, 'displayNameScore': 0.5288421052631578, 'brandName': 'MARKET 32', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211459665', 'resultId': '1603211459665', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 206}, 'name': 'package', 'quantity': 1}, 'calories': 290.4599914550781}}, {'type': 'reference', 'displayName': 'Cobb Salad With Turkey & Bacon', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Cobb Salad With Turkey & Bacon', 'scoredName': 'Cobb Salad With Turkey & Bacon', 'score': 0.5288421052631578, 'displayNameScore': 0.5288421052631578, 'brandName': 'Wal-Mart Stores, Inc.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211433526', 'resultId': '1603211433526', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 206}, 'name': 'container', 'quantity': 1}, 'calories': 319.29998779296875}}, {'type': 'reference', 'displayName': 'Cobb Gourmet Cafe Salad', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Cobb Gourmet Cafe Salad', 'scoredName': 'Cobb Gourmet Cafe Salad', 'score': 0.521211332398317, 'displayNameScore': 0.521211332398317, 'brandName': 'Fresh Express Incorporated', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1628606774639', 'resultId': '1628606774639', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 100}, 'name': 'serving', 'quantity': 1}, 'calories': 150}}, {'type': 'reference', 'displayName': 'Cobb Salad With Chicken & Bacon', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Cobb Salad With Chicken & Bacon', 'scoredName': 'Cobb Salad With Chicken & Bacon', 'score': 0.5268684863523573, 'displayNameScore': 0.5268684863523573, 'brandName': 'NOT A BRANDED ITEM', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211439766', 'resultId': '1603211439766', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 411}, 'name': 'salad', 'quantity': 1}, 'calories': 641.1600341796875}}, {'type': 'reference', 'displayName': 'Cobb Salad With Chicken & Bacon', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Cobb Salad With Chicken & Bacon', 'scoredName': 'Cobb Salad With Chicken & Bacon', 'score': 0.5268684863523573, 'displayNameScore': 0.5268684863523573, 'brandName': 'Taylor Fresh Foods, Inc.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211323565', 'resultId': '1603211323565', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 100}, 'name': 'cup', 'quantity': 1}, 'calories': 160}}, {'type': 'reference', 'displayName': 'Cobb Salad With Chicken & Bacon', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Cobb Salad With Chicken & Bacon', 'scoredName': 'Cobb Salad With Chicken & Bacon', 'score': 0.5268684863523573, 'displayNameScore': 0.5268684863523573, 'brandName': 'FRESH FOODS MARKET', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211298002', 'resultId': '1603211298002', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 100}, 'name': 'cup', 'quantity': 1}, 'calories': 150}}, {'type': 'reference', 'displayName': 'Cobb Salad With Chicken & Bacon', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Cobb Salad With Chicken & Bacon', 'scoredName': 'Cobb Salad With Chicken & Bacon', 'score': 0.5268684863523573, 'displayNameScore': 0.5268684863523573, 'brandName': 'ARCHER FARMS', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211274205', 'resultId': '1603211274205', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 292}, 'name': 'container', 'quantity': 1}, 'calories': 499.32000732421875}}, {'type': 'reference', 'displayName': 'Cobb Salad With Chicken And Bacon', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Cobb Salad With Chicken And Bacon', 'scoredName': 'Cobb Salad With Chicken And Bacon', 'score': 0.5232283813747228, 'displayNameScore': 0.5232283813747228, 'brandName': 'NOT A BRANDED ITEM', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211477697', 'resultId': '1603211477697', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 377}, 'name': 'container', 'quantity': 1}, 'calories': 380.7699890136719}}, {'type': 'reference', 'displayName': 'Cobb Salad With Chicken And Bacon', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Cobb Salad With Chicken And Bacon', 'scoredName': 'Cobb Salad With Chicken And Bacon', 'score': 0.5232283813747228, 'displayNameScore': 0.5232283813747228, 'brandName': 'Taylor Fresh Foods, Inc.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211381345', 'resultId': '1603211381345', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 383}, 'name': 'salad', 'quantity': 1}, 'calories': 478.75}}, {'type': 'reference', 'displayName': 'Cobb Salad With Chicken And Bacon', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Cobb Salad With Chicken And Bacon', 'scoredName': 'Cobb Salad With Chicken And Bacon', 'score': 0.5232283813747228, 'displayNameScore': 0.5232283813747228, 'brandName': 'Safeway, Inc.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211310904', 'resultId': '1603211310904', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 66.67}, 'name': 'cup', 'quantity': 1, 'suggestedQuantity': [1.5]}, 'calories': 140.00698852539062}}, {'type': 'recipe', 'displayName': 'Homemade Caprese Salad', 'stemmedDisplayName': '', 'shortName': 'Homemade Caprese Salad', 'longName': '', 'scoredName': 'Caprese Salad', 'score': 0.75286870935433, 'displayNameScore': 0.6958379001635208, 'brandName': '', 'iconId': 'PRE0053', 'labelId': '77aefc34-8951-11ea-a893-b71f9da3b59c', 'synonymId': '78156102-7dd6-11eb-8ccb-ff98802a1b29', 'recipeId': '0a8bda45-cfa1-11ec-936f-ca031f99a026', 'referenceId': '', 'resultId': '0a8bda45-cfa1-11ec-936f-ca031f99a026', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 176.5}, 'name': 'serving', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 354.9100036621094}}, {'type': 'reference', 'displayName': 'Chicken Cobb Side Salad', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Cobb Side Salad', 'scoredName': 'Chicken Cobb Side Salad', 'score': 0.4971591584852735, 'displayNameScore': 0.4971591584852735, 'brandName': 'Renaissance Food Group, LLC', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211347555', 'resultId': '1603211347555', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 156}, 'name': 'container', 'quantity': 1}, 'calories': 269.8800048828125}}, {'type': 'reference', 'displayName': 'Cobb Salad With White Meat Chicken & Bacon', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Cobb Salad With White Meat Chicken & Bacon', 'scoredName': 'Cobb Salad With White Meat Chicken & Bacon', 'score': 0.5106285714285714, 'displayNameScore': 0.5106285714285714, 'brandName': 'NOT A BRANDED ITEM', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211440280', 'resultId': '1603211440280', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 385}, 'name': 'salad', 'quantity': 1}, 'calories': 608.2999877929688}}, {'type': 'reference', 'displayName': 'Chicken Bacon Cobb Salad', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Bacon Cobb Salad', 'scoredName': 'Chicken Bacon Cobb Salad', 'score': 0.47541999999999995, 'displayNameScore': 0.47541999999999995, 'brandName': '', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': 'openfood0030223112150', 'resultId': 'openfood0030223112150', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 100}, 'name': '', 'quantity': 1, 'suggestedQuantity': [1]}, 'calories': 140}}, {'type': 'reference', 'displayName': 'Chicken And Bacon Cobb Salad', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken And Bacon Cobb Salad', 'scoredName': 'Chicken And Bacon Cobb Salad', 'score': 0.466182857142857, 'displayNameScore': 0.466182857142857, 'brandName': 'Renaissance Food Group, LLC', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211347911', 'resultId': '1603211347911', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 318}, 'name': 'container', 'quantity': 1}, 'calories': 550.1400146484375}}, {'type': 'reference', 'displayName': 'Chicken And Bacon Cobb Salad', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken And Bacon Cobb Salad', 'scoredName': 'Chicken And Bacon Cobb Salad', 'score': 0.466182857142857, 'displayNameScore': 0.466182857142857, 'brandName': 'Fresh Food Manufacturing', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211321292', 'resultId': '1603211321292', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 468}, 'name': 'container', 'quantity': 1}, 'calories': 421.1999816894531}}, {'type': 'reference', 'displayName': 'Cobb Salad With Grilled Chicken Breast (With Rib Meat)', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Cobb Salad With Grilled Chicken Breast (With Rib Meat)', 'scoredName': 'Cobb Salad With Grilled Chicken Breast (With Rib Meat)', 'score': 0.4997275985663082, 'displayNameScore': 0.4997275985663082, 'brandName': "Triple 'B' Corporation", 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211279799', 'resultId': '1603211279799', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 283}, 'name': 'container', 'quantity': 1}, 'calories': 350.91998291015625}}, {'type': 'reference', 'displayName': 'Turkey And Bacon Cobb Salad', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Turkey And Bacon Cobb Salad', 'scoredName': 'Turkey And Bacon Cobb Salad', 'score': 0.44866031746031737, 'displayNameScore': 0.44866031746031737, 'brandName': 'Del Monte Fresh Produce N.A., Inc.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211309610', 'resultId': '1603211309610', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 227}, 'name': 'container', 'quantity': 1}, 'calories': 440.3800048828125}}, {'type': 'reference', 'displayName': 'Turkey And Bacon Cobb Salad', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Turkey And Bacon Cobb Salad', 'scoredName': 'Turkey And Bacon Cobb Salad', 'score': 0.44866031746031737, 'displayNameScore': 0.44866031746031737, 'brandName': 'Ready Pac Produce, Inc.', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211301247', 'resultId': '1603211301247', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 205}, 'name': 'bowl', 'quantity': 1}, 'calories': 289.04998779296875}}, {'type': 'reference', 'displayName': 'Chicken Breast Cobb Salad With Bacon', 'stemmedDisplayName': '', 'shortName': '', 'longName': 'Chicken Breast Cobb Salad With Bacon', 'scoredName': 'Chicken Breast Cobb Salad With Bacon', 'score': 0.4838642424242423, 'displayNameScore': 0.4838642424242423, 'brandName': 'Renaissance Food Group, LLC', 'iconId': '', 'labelId': '', 'synonymId': '', 'recipeId': '', 'referenceId': '1603211434012', 'resultId': '1603211434012', 'nutritionPreview': {'portion': {'weight': {'unit': 'g', 'value': 100}, 'name': 'cup salad with 2 tbsp dressing', 'quantity': 1}, 'calories': 140}}], 'alternateNames': ['cobb salad', 'shrimp cobb salad', 'taco salad', 'bean salad', 'kale salad', 'tuna salad', 'cucumber salad', 'garden salad with chicken', 'egg salad', 'couscous salad', 'caesar salad', 'potato salad', 'fruit salad', 'greek salad', 'quinoa salad', 'garden salad', 'creamy chicken salad', 'creamy pasta salad', 'spinach salad', 'lambs lettuce']}
========================
The Cobb Salad you had for lunch contained approximately 193.2 calories per cup.
## init
from llama_index.tools.passio_nutrition_ai.base import (
ENDPOINT_BASE_URL,
NutritionAIToolSpec,
)
__all__ = ["NutritionAIToolSpec", "ENDPOINT_BASE_URL"]
"""Passio Nutrition Search tool spec."""
from typing import final, NoReturn
from datetime import datetime, timedelta
import requests
from llama_index.core.tools.tool_spec.base import BaseToolSpec
ENDPOINT_BASE_URL = "https://api.passiolife.com/v2/products/napi/food/search/advanced"
class NoDiskStorage:
@final
def __getstate__(self) -> NoReturn:
raise AttributeError("Do not store on disk.")
@final
def __setstate__(self, state) -> NoReturn:
raise AttributeError("Do not store on disk.")
try:
from tenacity import (
retry,
stop_after_attempt,
wait_random,
wait_exponential,
retry_if_result,
)
except ImportError:
# No retries if tenacity is not installed.
def retry(f, *args, **kwargs):
return f
def stop_after_attempt(n):
return None
def wait_random(a, b):
return None
def wait_exponential(multiplier, min, max):
return None
def is_http_retryable(rsp):
# -return rsp and rsp.status_code >= 500
return (
rsp
and not isinstance(rsp, dict)
and rsp.status_code in [408, 425, 429, 500, 502, 503, 504]
)
class ManagedPassioLifeAuth(NoDiskStorage):
"""Manages the token for the NutritionAI API."""
def __init__(self, subscription_key: str):
self.subscription_key = subscription_key
self._last_token = None
self._access_token_expiry = None
self._access_token = None
self._customer_id = None
@property
def headers(self) -> dict:
if not self.is_valid_now():
self.refresh_access_token()
return {
"Authorization": f"Bearer {self._access_token}",
"Passio-ID": self._customer_id,
}
def is_valid_now(self):
return (
self._access_token is not None
and self._customer_id is not None
and self._access_token_expiry is not None
and self._access_token_expiry > datetime.now()
)
@retry(
retry=retry_if_result(is_http_retryable),
stop=stop_after_attempt(4),
wait=wait_random(0, 0.3) + wait_exponential(multiplier=1, min=0.1, max=2),
)
def _http_get(self, subscription_key):
return requests.get(
f"https://api.passiolife.com/v2/token-cache/napi/oauth/token/{subscription_key}"
)
def refresh_access_token(self):
"""Refresh the access token for the NutritionAI API."""
rsp = self._http_get(self.subscription_key)
if not rsp:
raise ValueError("Could not get access token")
self._last_token = token = rsp.json()
self._customer_id = token["customer_id"]
self._access_token = token["access_token"]
self._access_token_expiry = (
datetime.now()
+ timedelta(seconds=token["expires_in"])
- timedelta(seconds=5)
) # 5 seconds: approximate time for a token refresh to be processed.
class NutritionAIToolSpec(BaseToolSpec):
"""Tool that queries the Passio Nutrition AI API."""
spec_functions = ["nutrition_ai_search"]
auth_: ManagedPassioLifeAuth
def __init__(self, api_key: str) -> None:
"""Initialize with parameters."""
self.auth_ = ManagedPassioLifeAuth(api_key)
@retry(
retry=retry_if_result(is_http_retryable),
stop=stop_after_attempt(4),
wait=wait_random(0, 0.3) + wait_exponential(multiplier=1, min=0.1, max=2),
)
def _http_get(self, query: str):
return requests.get(
ENDPOINT_BASE_URL,
headers=self.auth_.headers,
params={"term": query}, # type: ignore
)
def _nutrition_request(self, query: str):
response = self._http_get(query)
if not response:
raise ValueError("No response from NutritionAI API.")
return response.json()
def nutrition_ai_search(self, query: str):
"""
Retrieve nutrition facts for a given food item.
Input should be a search query string for the food item.
Args:
query (str): The food item to look for.
Returns a JSON result with the nutrition facts for the food item and, if available, alternative food items which sometimes are a better match.
"""
return self._nutrition_request(query)
Source diff could not be displayed: it is too large. Options to address this: view the blob.
[build-system]
build-backend = "poetry.core.masonry.api"
requires = ["poetry-core"]
[tool.codespell]
check-filenames = true
check-hidden = true
skip = "*.csv,*.html,*.json,*.jsonl,*.pdf,*.txt,*.ipynb"
[tool.llamahub]
contains_example = false
import_path = "llama_index.tools.passio_nutrition_ai"
[tool.llamahub.class_authors]
NutritionAIToolSpec = "ivyas21"
[tool.mypy]
disallow_untyped_defs = true
exclude = ["_static", "build", "examples", "notebooks", "venv"]
ignore_missing_imports = true
python_version = "3.10"
[tool.poetry]
authors = ["Your Name <you@example.com>"]
description = "llama-index tools passio_nutrition_ai integration"
exclude = ["**/BUILD"]
license = "MIT"
maintainers = ["ivyas21"]
name = "llama-index-tools-passio-nutrition-ai"
readme = "README.md"
version = "0.1.3"
[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
llama-index-core = "^0.10.1"
[tool.poetry.group.dev.dependencies]
ipython = "8.10.0"
jupyter = "^1.0.0"
mypy = "0.991"
pre-commit = "3.2.0"
pylint = "2.15.10"
pytest = "7.2.1"
pytest-mock = "3.11.1"
ruff = "0.0.292"
tree-sitter-languages = "^1.8.0"
types-Deprecated = ">=0.1.0"
types-PyYAML = "^6.0.12.12"
types-protobuf = "^4.24.0.4"
types-redis = "4.5.5.0"
types-requests = "2.28.11.8"
types-setuptools = "67.1.0.0"
[tool.poetry.group.dev.dependencies.black]
extras = ["jupyter"]
version = "<=23.9.1,>=23.7.0"
[tool.poetry.group.dev.dependencies.codespell]
extras = ["toml"]
version = ">=v2.2.6"
[[tool.poetry.packages]]
include = "llama_index/"
python_tests()
from llama_index.core.tools.tool_spec.base import BaseToolSpec
from llama_index.tools.passio_nutrition_ai import NutritionAIToolSpec
def test_class():
names_of_base_classes = [b.__name__ for b in NutritionAIToolSpec.__mro__]
assert BaseToolSpec.__name__ in names_of_base_classes
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment