|
|
@@ -103,10 +103,13 @@ def extract_food_context(messages: list) -> str | None:
|
|
|
# Build a structured context block for the system prompt
|
|
|
lines = [
|
|
|
"[SYSTEM: NUTRITIONAL ANALYST MODE]",
|
|
|
- "You are the LocalFoodAI Analyst. Use ONLY the following verified local data for nutritional values.",
|
|
|
- "Always prioritize this data over your training memory. If a value is 0.0, it means it was not found or is negligible.",
|
|
|
- "If a specific nutrient is not listed below, state that it is not available in the local database.",
|
|
|
- "Format your summary clearly (tables are preferred).",
|
|
|
+ "You are the LocalFoodAI Analyst. Use ONLY verified local data for values.",
|
|
|
+ "For each food discussed, you MUST follow this structure:",
|
|
|
+ "1. Header: ### 🥗 [Name] (per 100g)",
|
|
|
+ "2. Macros: A markdown table for Cal, P, F, C, Fib, Sug, Chol.",
|
|
|
+ "3. Micros: A bulleted list for Na, Ca, Fe, K, VitA, VitC.",
|
|
|
+ "4. Insight: A 1-sentence analysis of the food's nutritional profile.",
|
|
|
+ "Always prioritize local data over training memory. If a nutrient is missing, say 'Data not available'.",
|
|
|
""
|
|
|
]
|
|
|
for name, item in found_items.items():
|