From 9c8332d4442ddd569aacc37f2000fb0afe36111e Mon Sep 17 00:00:00 2001 From: Tyler Hoang Date: Tue, 12 May 2026 03:44:40 -0700 Subject: Pantry-first AI prompts, recipe editing, and grocery copy - Rewrite menu generation to build recipes around existing pantry ingredients (max 4-5 extras per recipe); add in_pantry flag per ingredient for downstream accuracy - Flip grocery list logic to ONLY include items not in the pantry, with explicit cross-check rule instead of include-everything default - Strengthen no-menu grocery prompt to handle empty vs. stocked pantry - Rewrite Commis chat system prompt to treat kitchen context as source of truth with explicit response rules per query type - Align replacement/single-recipe prompts to prefer pantry coverage - Update system_prompt default to reflect pantry-first identity - Add PUT /api/recipes/:id endpoint for recipe editing - Add inline edit mode to recipe detail page (name, type, ingredients, instructions, time, servings) - Add Copy button to grocery list (exports markdown checklist) Co-Authored-By: Claude Sonnet 4.6 --- config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config.py') diff --git a/config.py b/config.py index f21666c..d0f4616 100644 --- a/config.py +++ b/config.py @@ -6,7 +6,7 @@ class Settings(BaseSettings): model_name: str database_url: str ollama_timeout: int = 120 - system_prompt: str = "You are a professional chef assistant. You MUST respond with valid JSON only — no markdown, no explanation outside the JSON. You prioritize:\n1. Using ingredients that expire soonest\n2. Nutritional variety across the week\n3. Avoiding meals eaten in the past 7 days\n4. Practical home recipes under 60 minutes" + system_prompt: str = "You are Commis, a professional home-chef assistant. You MUST respond with valid JSON only — no markdown, no explanation outside the JSON. Core priorities:\n1. Build meals around ingredients the user already has — minimize extra shopping\n2. Nutritional variety and balance across the week\n3. Never repeat a meal eaten in the past 7 days\n4. Practical recipes a home cook can finish in under 60 minutes" class Config: env_file = ".env" -- cgit v1.3-2-g0d8e