Files
healthy-fit/backend/app/core/ai_config.py
Carlos Escalante 184c8330a7 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.
2026-01-18 17:14:56 -06:00

10 lines
207 B
Python

import dspy
from app.config import settings
def configure_dspy():
if settings.OPENAI_API_KEY:
lm = dspy.LM("openai/gpt-4o-mini", api_key=settings.OPENAI_API_KEY)
dspy.configure(lm=lm)