Recipe transform
Problem: Preview vegan substitutions for a recipe. TypeScriptPython const preview = await client.transforms.preview({ recipeId: "...", goal: "VEGAN", }); for…
Problem: Preview vegan substitutions for a recipe.
const preview = await client.transforms.preview({
recipeId: "...",
goal: "VEGAN",
});
for (const swap of preview.transformed_ingredients) {
console.log(swap.from_name, "→", swap.to_name, swap.confidence);
}
const execution = await client.transforms.execute({
recipeId: "...",
goal: "VEGAN",
});
const provenance = await client.transforms.explain({
executionId: execution.execution_id,
});
console.log(provenance.explanations);