Parse ingredient
parse_ingredientParses free-form ingredient strings into structured amount, unit, food, and note fields, creating missing Tandoor Food or Unit records as needed.
Instructions
Parse a free-form ingredient string (e.g. "2 cups flour") into amount, unit, unit_id, food, food_id, note. Writes to the database: Tandoor creates any Food or Unit row it does not already have. unit and food are the matched row names, so "cups" can come back as "cup". With no unit, unit is "" and unit_id is omitted. food_id and unit_id pass straight to create_ingredient. Blank text returns Tandoor's 400. Tandoor's parser is heuristic and can misfire on compound descriptions, brand names, or non-English units.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes |