Implement AI Skill Retrieval Profiles and Enhance Exercise AI Functionality
Deploy Development / deploy (push) Successful in 41s
Test Suite / pytest-backend (push) Successful in 38s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 12s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Successful in 1m13s
Deploy Development / deploy (push) Successful in 41s
Test Suite / pytest-backend (push) Successful in 38s
Test Suite / lint-backend (push) Successful in 1s
Test Suite / build-frontend (push) Successful in 12s
Test Suite / k6 /health Baseline (push) Successful in 34s
Test Suite / playwright-tests (push) Successful in 1m13s
- Introduced migration 068 for `ai_skill_retrieval_profiles`, enabling configurable weights and quotes for skill catalog prioritization in exercise AI suggestions. - Updated the `POST /api/exercises/ai/suggest` endpoint to include an optional `focus_areas_context` field, allowing for enhanced context in AI-generated suggestions. - Enhanced the `exercise_ai` module to utilize context-based skill selection, incorporating scoring, category caps, and keyword patches for improved AI responses. - Updated the ExerciseFormPageRoot component to pass focus area context to the AI suggestion API, streamlining user interaction with AI-generated content. - Incremented version numbers in `backend/version.py` to reflect the latest changes and ensure accurate tracking in the changelog.
This commit is contained in:
1 parent
e5291256d0
commit
294b09a5d9
11 files changed
+802
-70
No files matched your search
@@ -980,6 +980,18 @@ function ExerciseFormPageRoot() {
|
||||
const snapshotSummaryHtml = formData.summary || ''
|
||||
const snapshotSkills = cloneExerciseSkillRows(formData.skills)
|
||||
|
||||
const focusAreasContext = [...(formData.focus_areas_multi || [])]
|
||||
.map((row) => ({
|
||||
focus_area_id: Number(row?.focus_area_id),
|
||||
is_primary: !!row?.is_primary,
|
||||
}))
|
||||
.filter((x) => Number.isFinite(x.focus_area_id) && x.focus_area_id >= 1)
|
||||
.sort((a, b) => {
|
||||
const p = Number(!!b.is_primary) - Number(!!a.is_primary)
|
||||
if (p !== 0) return p
|
||||
return a.focus_area_id - b.focus_area_id
|
||||
})
|
||||
|
||||
setAiSuggestBusy(true)
|
||||
try {
|
||||
const res = await api.suggestExerciseAi({
|
||||
@@ -987,6 +999,7 @@ function ExerciseFormPageRoot() {
|
||||
goal: formData.goal || '',
|
||||
execution: formData.execution || '',
|
||||
focus_area_hint: focusHint || undefined,
|
||||
focus_areas_context: focusAreasContext.length ? focusAreasContext : undefined,
|
||||
include_summary: summaryOn,
|
||||
include_skills: skillsOn,
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user