Add AI-powered nutrition and plan modules

Introduces DSPy-based nutrition and plan generation modules, including image analysis for nutritional info and personalized diet/exercise plans. Adds new API endpoints for health metrics/goals, nutrition image analysis, and plan management. Updates models, schemas, and backend structure to support these features, and includes initial training data and configuration for prompt optimization.
This commit is contained in:
Carlos Escalante
2026-01-18 17:14:56 -06:00
parent 5dc6dc88f7
commit 184c8330a7
36 changed files with 2868 additions and 110 deletions

View File

@@ -1,4 +1,5 @@
from typing import Any
from fastapi import APIRouter, Depends, HTTPException
from sqlmodel import Session, select
@@ -9,6 +10,7 @@ from app.schemas.user import UserCreate, UserRead
router = APIRouter()
@router.post("/", response_model=UserRead)
def create_user(
*,
@@ -24,7 +26,7 @@ def create_user(
status_code=400,
detail="The user with this email already exists in the system",
)
user = User(
email=user_in.email,
username=user_in.username,