aaa / app /api /v2 /student_profile.py
work-sejal
Deploy AI service with FastAPI
70ea7be
Raw
History Blame Contribute Delete
788 Bytes
"""Student profile router.
GET /ai/v2/student-profile/{student_id} — returns a digital twin aggregation.
"""
from fastapi import APIRouter, Depends
from app.api.v2.dependencies import get_student_profile_service
from app.schemas.student_profile import StudentProfileResponse
router = APIRouter(prefix="/ai/v2", tags=["inference"])
@router.get(
"/student-profile/{student_id}",
response_model=StudentProfileResponse,
summary="Get Student Profile",
description="Return a digital twin aggregation for a student.",
)
async def get_student_profile(
student_id: str,
service=Depends(get_student_profile_service),
) -> StudentProfileResponse:
"""Retrieve the aggregated student profile (digital twin)."""
return service.get_profile(student_id=student_id)