Just sharing a little feature that makes use of the ‘Complete Chat’ AI integration. The App sends an image of some food along with a prompt that asks for a descriptive title, visible ingredients and then an estimate of some nutritional info. I ask the output to be in JSON so that I can easily handle the data.
I’m impressed with how meticulous it is at identifying ingredients… and for this use case the data is accurate enough. Nice job Glide!
This is very cool! I want to create something similar.
Did you use the openAI integration to do this? I can’t find an option to send an image with a prompt to OpenAI.
Sure here you go. This took quite a few iterations to figure out a stable version…
Please generate a JSON object with the following structure, using the attached meal description:
{
“Title”: “A descriptive title for the recipe”,
“NutritionalEstimates”: {
“Calories”: Estimated amount of calories in kcal without quotes,
“Fat”: Estimated amount of fat in grams without quotes,
“Carbs”: Estimated amount of carbohydrates in grams without quotes,
“Protein”: Estimated amount of protein in grams without quotes,
“Sugar”: Estimated amount of sugar in grams without quotes
},
“Ingredients”: [
“First ingredient”,
“Second ingredient”,
// Add additional visible ingredients here
]
}
Make sure that the numerical values for “Calories”, “Fat”, “Carbs”, “Protein”, and “Sugar” are given as numbers without quotes. Provide the JSON object as a direct response without any additional comments or annotations - only output the JSON object and do not include ```json
Funny, I already had a nutrition prompt and after adding yours , they produce different results . Ill have to enter into a tracking app and see which results are more accurate.