Goals -System refactored - Platzhaltersystem enhanced (als draft) #53

Merged
Lars merged 86 commits from develop into main 2026-03-31 11:46:48 +02:00
Showing only changes of commit 5b4688fa30 - Show all commits

View File

@ -112,10 +112,8 @@ def get_nutrition_avg(profile_id: str, field: str, days: int = 30) -> str:
This function now only FORMATS the data for AI consumption.
"""
data = get_nutrition_average_data(profile_id, days)
print(f"[DEBUG] get_nutrition_average_data returned: {data}")
if data['confidence'] == 'insufficient':
print(f"[DEBUG] Confidence is insufficient, returning 'nicht verfügbar'")
return "nicht verfügbar"
# Map field names to data keys
@ -127,7 +125,6 @@ def get_nutrition_avg(profile_id: str, field: str, days: int = 30) -> str:
}
data_key = field_map.get(field, f'{field}_avg')
value = data.get(data_key, 0)
print(f"[DEBUG] field={field}, data_key={data_key}, value={value}")
if field == 'kcal':
return f"{int(value)} kcal/Tag (Ø {days} Tage)"