added way to extract recipe title

This commit is contained in:
Quentin Leblanc 2025-07-10 12:37:03 +02:00
parent a021eb3c2f
commit 7e33bc9a85

View File

@ -22,7 +22,7 @@ def text_recipe_analysis(recipe: str, **kwargs) -> dict[str, Any]:
:return: dict containing ingredients and preparation method
"""
task = f"""Your task is to analyze a recipe.
For this analysis you have to extract ingredients and their quantitites.
For this analysis you have to extract the recipe name, ingredients and their quantitites.
The quantities extracted must be expressed in grams (g).
If any other unit are used, convert it to grams.
You also have to extract the preparation method.
@ -30,6 +30,7 @@ Temperatures in the preparation method must be expressed in °Celsius (°C).
If Temperatures are in Farhenheit (°F) convert it in °Celsius (°C) and round it to the nearest integer multiple of ten.
Your answer must be formatted so that it can be stored in a json format.
The json must be containing the fields:
- "title": title of the recipe
- "ingredients", that is an array of objects with field "name" that is a string and "amount" that is a number;
- "preparation", that is the text of the preparation method.