All checks were successful
Deploy Development / deploy (push) Successful in 43s
Test Suite / pytest-backend (push) Successful in 43s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 13s
Test Suite / k6 /health Baseline (push) Successful in 47s
Test Suite / playwright-tests (push) Successful in 1m14s
- Implemented optional LLM-Rerank functionality in the planning exercise suggestion process, allowing for improved exercise ranking based on user-defined criteria. - Updated the `suggestPlanningExercises` API to accept `planned_exercise_ids` for client-side overrides, enhancing flexibility in exercise selection. - Enhanced the `ExercisePickerModal` to reflect LLM ranking status and support new planning context features. - Incremented application version to 0.8.170 and updated changelog to document the new features and improvements in the planning AI capabilities.
21 lines
737 B
Python
21 lines
737 B
Python
"""
|
|
POST /api/planning/exercise-suggest — planungsgebundene Übungssuche (Hybrid + Profil + optional LLM-Rerank).
|
|
"""
|
|
from fastapi import APIRouter, Depends
|
|
|
|
from db import get_db, get_cursor
|
|
from tenant_context import TenantContext, get_tenant_context
|
|
from planning_exercise_suggest import PlanningExerciseSuggestRequest, suggest_planning_exercises
|
|
|
|
router = APIRouter(prefix="/api/planning", tags=["planning_exercise_suggest"])
|
|
|
|
|
|
@router.post("/exercise-suggest")
|
|
def post_planning_exercise_suggest(
|
|
body: PlanningExerciseSuggestRequest,
|
|
tenant: TenantContext = Depends(get_tenant_context),
|
|
):
|
|
with get_db() as conn:
|
|
cur = get_cursor(conn)
|
|
return suggest_planning_exercises(cur, tenant=tenant, body=body)
|