Skip to content

Docs

CommunityJev Cookbooks

Shopping Cart Cookbook

Runnable cookbook that turns a natural-language cafe order into a structured cart: a shrinking-options loop of Choice questions finds each item, then one batched request per item fills its known fields.
Format
Docs
Reading time
2 min
Published by
Community
Added
Nov 23, 2026

Highlights

  • Two stages: a shrinking-options loop of Choice questions finds items, then one batched request per item fills fields.
  • Every item request includes a nothing_else sentinel option so the loop stops when no menu item remains.
  • MAX_ITEM_REQUESTS is 6, a hard stop so a bad answer can never loop forever.
  • Runs as published without an API key by replaying saved answers from cart_from_primitives_cache.json.
  • Numbers came from jev-1.14.0 on 2026-10-29; the menu has four items and only the latte has fields.

Questions about this entry

Short answers drawn from the linked project or page.

From the Jev guides

Original write-ups on what this entry is for.

From the Jev AI model community

Posts from builders shipping with Jev right now.

Follow @typesafeai