gpt-4o-mini-2024-07-18· OpenAI
WildChat-4.8M (AI2)
Goal Objectif est de transformer une liste brute d'ingrédients en une liste d'objets…
- User
Goal Objectif est de transformer une liste brute d'ingrédients en une liste d'objets JSON bien structurés, en respectant les règles suivantes :
Extraction des informations : Séparer la quantité, l’unité et le détail de chaque ingrédient. Mapping des données : Structurer les informations dans un format JSON précis. Conservation des détails : Préserver les informations supplémentaires (ex. : ce qui est entre parenthèses). Catégorisation : Attribuer la bonne catégorie à chaque ingrédient parmi cette liste : Dairy, Meats, Cereals, Seeds, Chocolates, Spices, Fishs, Pasta, Seafoods, Vegetables, Fruits, Legumes, Eggs, Condiments, Sweets, Unclassifiable. Return Format Renvoies une seule liste JSON contenant les objets formatés comme suit : json [ { "name": <name>, "unit": <unity>, "qty": <qty>, "category": <category> } ] - name doit être le nom de l'ingrédient avec détails - unity doit être l'unité (g, ml, pincée, etc.) - qty doit être un nombre (valeur numérique) - category doit être la catégorisation attribué Warnings - Respecte strictement la structure de l’objet JSON (pas d'ajout ou de suppression de clés). - Conserve les détails supplémentaires des ingrédients (ex. : texte entre parenthèses). - Vérifie que la catégorie attribuée est correcte selon la liste fournie. - Ne modifie pas les quantités ou unités, mais assure-toi qu’elles sont bien séparées du nom de l’ingrédient. - Ne fournis que le JSON formaté, sans explication. - Assure-toi que le JSON soit bien formatté et valide. Context Dump Ingrédients bruts : json "250G 8.82 ONCES (2 TASSES) DE FARINE; 20G 0.71 ONCE (5 CUILLERES À CAFÉ) DE SUCRE; 12G 0.42 ONCE DE LA LEVURE BAKERS; 50G 1.76 ONCES (3 1/2 CUILLÈRES À SOUPE) DE BEURRE; 135G 4.76 ONCES (1/2 TASSE PLUS 1 CUILLÈRE À SOUPE) DE LAIT; 5G 0.18 ONCE (1 CUILLÈRE À CAFÉ) DE SEL; 1 SAUCISSE DE CERVELAS AUX PISTACHES, CUITE; 1 JAUNE D'ŒUF, BATU; 1 ÉCHALOTE; 1/2 CAROTTE; 1/2 BRIN DE CELERI; 40G 1.41 ONCES (3 CUILLÈRES À SOUPE) DE BEURRE; 500ML 2 TASSES DE VIN ROUGE RASTEAU OU PORT; 500ML 2 TASSES DE JUS DE VEAU (VOIR P. 250); FLEUR DE SEL; POIVRE FRAÎCHEMENT MOULU" - Assistant
[ { "name": "FARINE (2 TASSES)", "unit": "g", "qty": 250, "category": "Cereals" }, { "name": "SUCRE (5 CUILLERES À CAFÉ)", "unit": "g", "qty": 20, "category": "Sweets" }, { "name": "LEVURE BAKERS", "unit": "g", "qty": 12, "category": "Unclassifiable" }, { "name": "BEURRE (3 1/2 CUILLÈRES À SOUPE)", "unit": "g", "qty": 50, "category": "Dairy" }, { "name": "LAIT (1/2 TASSE PLUS 1 CUILLÈRE À SOUPE)", "unit": "g", "qty": 135, "category": "Dairy" }, { "name": "SEL (1 CUILLÈRE À CAFÉ)", "unit": "g", "qty": 5, "category": "Condiments" }, { "name": "SAUCISSE DE CERVELAS AUX PISTACHES, CUITE", "unit": null, "qty": 1, "category": "Meats" }, { "name": "JAUNE D'ŒUF, BATU", "unit": null, "qty": 1, "category": "Eggs" }, { "name": "ÉCHALOTE", "unit": null, "qty": 1, "category": "Vegetables" }, { "name": "CAROTTE", "unit": null, "qty": 0.5, "category": "Vegetables" }, { "name": "BRIN DE CELERI", "unit": null, "qty": 0.5, "category": "Vegetables" }, { "name": "BEURRE (3 CUILLÈRES À SOUPE)", "unit": "g", "qty": 40, "category": "Dairy" }, { "name": "VIN ROUGE RASTEAU OU PORT (2 TASSES)", "unit": "ml", "qty": 500, "category": "Unclassifiable" }, { "name": "JUS DE VEAU (VOIR P. 250)", "unit": "ml", "qty": 500, "category": "Unclassifiable" }, { "name": "FLEUR DE SEL", "unit": null, "qty": 1, "category": "Condiments" }, { "name": "POIVRE FRAÎCHEMENT MOULU", "unit": null, "qty": 1, "category": "Spices" } ]