summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--services/ai_service.py5
-rw-r--r--services/pantry_service.py9
2 files changed, 2 insertions, 12 deletions
diff --git a/services/ai_service.py b/services/ai_service.py
index 0abad09..f128b4a 100644
--- a/services/ai_service.py
+++ b/services/ai_service.py
@@ -37,7 +37,7 @@ PANTRY STATE:
GUIDELINES:
- Suggest genuinely good, practical dishes — do NOT limit yourself to only pantry ingredients
-- Prioritize using ingredients expiring soon (see expiring_soon), but feel free to include recipes that require buying additional items
+- Use pantry ingredients where it makes sense, but freely include recipes that require buying additional items
- Avoid meals eaten in the last 7 days (see recent_meals)
- Include a mix of breakfast, lunch, and dinner options
- Keep each recipe under 60 minutes
@@ -121,9 +121,6 @@ async def generate_grocery_list_from_pantry(pantry_context: dict, user_notes: st
CURRENT PANTRY:
{json.dumps(pantry_context["available_ingredients"], indent=2)}
-EXPIRING SOON:
-{json.dumps(pantry_context.get("expiring_soon", []), indent=2)}
-
RULES:
- Suggest ingredients that would complement what's already in the pantry
- Group items by store section (produce, dairy, protein, pantry, frozen, bakery)
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)