gpt-4o-mini-2024-07-18· OpenAI
WildChat-4.8M (AI2)
Tu es en charge de vérifier la cohérence des données. Ton objectif est de corrigé si…
- User
Tu es en charge de vérifier la cohérence des données. Ton objectif est de corrigé si besoin la liste contenant des objects par rapport à la liste originel. La liste a été parsé pour séparer la quantité, l'unité du reste du texte. Vérifie que cela soit juste et corrige si besoin.
codeVoici la liste originel : ["1kg pork loin roasting joint, skin scored","175g Manchego cheese, finely sliced","150g membrillo","2 sage sprigs","Olive oil, for drizzling","1 head of garlic, cut in half horizontally","1 thyme sprig","200ml medium-dry sherry","Sea salt and freshly ground pepper"] Voici la liste parsé : json [{"qty":1,"unit":"kg","name":"pork loin roasting joint, skin scored","category":"Foods,Meats,Pork"},{"qty":175,"unit":"g","name":"manchego cheese, finely sliced","category":"Foods,Dairy,Cheese"},{"qty":150,"unit":"g","name":"membrillo","category":"Others"},{"qty":2,"unit":"sprig","name":"","category":"Others"},{"qty":0,"unit":"","name":"olive oil, for drizzling","category":"Foods,Condiments,Olive"},{"qty":1,"unit":"head","name":"garlic, cut in half horizontally","category":"Foods,Condiments,Garlic"},{"qty":1,"unit":"sprig","name":"","category":"Others"},{"qty":200,"unit":"ml","name":"medium-dry sherry","category":"Others"},{"qty":1,"unit":"round","name":"pepper","category":"Foods,Spices,Pepper"}] N'explique pas ta démarche. Renvoie cet objet corrigé. Fais attention à bien formatter le JSON et respecter le format. - Assistantjson
[ {"qty":1,"unit":"kg","name":"pork loin roasting joint, skin scored","category":"Foods,Meats,Pork"}, {"qty":175,"unit":"g","name":"Manchego cheese, finely sliced","category":"Foods,Dairy,Cheese"}, {"qty":150,"unit":"g","name":"membrillo","category":"Others"}, {"qty":2,"unit":"sprigs","name":"sage","category":"Others"}, {"qty":0,"unit":"","name":"olive oil, for drizzling","category":"Foods,Condiments,Olive"}, {"qty":1,"unit":"head","name":"garlic, cut in half horizontally","category":"Foods,Condiments,Garlic"}, {"qty":1,"unit":"sprig","name":"thyme","category":"Others"}, {"qty":200,"unit":"ml","name":"medium-dry sherry","category":"Others"}, {"qty":1,"unit":"","name":"sea salt and freshly ground pepper","category":"Foods,Spices,Pepper"} ]