From aba03fd72df5729a86d21c6866761b43a8abad68 Mon Sep 17 00:00:00 2001 From: Tyler Hoang Date: Sat, 9 May 2026 01:26:06 -0700 Subject: Remove expiry and quantity from AI context and prompts - Strip quantity, unit, and expiry from pantry data sent to AI (name + category only) - Remove "prioritize expiring soon" guideline from menu generation prompt - Remove EXPIRING SOON section from pantry-only grocery prompt - SYSTEM_PROMPT in .env (gitignored) updated to drop expiry/quantity priorities Co-Authored-By: Claude Sonnet 4.6 --- services/pantry_service.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'services/pantry_service.py') diff --git a/services/pantry_service.py b/services/pantry_service.py index 19271e5..c428098 100644 --- a/services/pantry_service.py +++ b/services/pantry_service.py @@ -14,19 +14,12 @@ def build_pantry_context(db: Session) -> dict: available = [ { "name": i.name, - "quantity": i.quantity, - "unit": i.unit, "category": i.category, - "expiry": i.expiry_date.isoformat() if i.expiry_date else None, } for i in all_ingredients ] - # Expiring within 3 days - expiring = [ - i for i in available - if i["expiry"] and i["expiry"] <= soon.isoformat() - ] + expiring = [] # Recent meals (last 14 days) cutoff = datetime.utcnow() - timedelta(days=14) -- cgit v1.3-2-g0d8e