Adaptiven A1-Kurs und statistisches Aussprachetraining integrieren
Direkte DeepSeek- und Mistral-Anbindung mit versionierten Aktionsprofilen, Budgetreservierung, Tokenabrechnung und administrativen Qualitätsprüfungen ersetzen die Flowise-Abhängigkeit im regulären Betrieb. 840 geprüfte A1-Aufgaben mit geschützter Testauswertung und konkreten offenen Arbeitsaufträgen ergänzen den Kurs. Inhalts- und Sprachbewertung bleiben von Azure-Aussprachewerten getrennt; historische Aufgaben und Antworten bleiben erhalten. Echte Wort- und Phonemmessungen werden mit Herkunft, Aktualität und Nachweisdichte gebündelt. Go bestimmt Trainingsziele und Wiederholungen, das Modell formuliert dazu passende Nachsprechübungen. Profilansicht und Auswahlgründe werden angezeigt. Validierung: Go-Race-Tests mit lokaler PostgreSQL-Integration, go vet, Web-Build, Audit aller 840 Aufgaben und drei Browser-Smokes mit lokalen Modell-/Speech-Fixtures bestanden. Keine Produktionsänderungen oder Live-Aufrufe.
This commit is contained in:
@@ -62,27 +62,31 @@ type Lesson struct {
|
||||
}
|
||||
|
||||
type Exercise struct {
|
||||
ID string `json:"id"`
|
||||
LessonID string `json:"lesson_id"`
|
||||
TargetLanguage string `json:"target_language"`
|
||||
CEFRLevel string `json:"cefr_level"`
|
||||
Type string `json:"type"`
|
||||
PromptText string `json:"prompt_text"`
|
||||
TargetText string `json:"target_text"`
|
||||
Difficulty int `json:"difficulty"`
|
||||
Source string `json:"source,omitempty"`
|
||||
TrainingReason string `json:"training_reason,omitempty"`
|
||||
TrainingCategory string `json:"training_category,omitempty"`
|
||||
ID string `json:"id"`
|
||||
LessonID string `json:"lesson_id"`
|
||||
TargetLanguage string `json:"target_language"`
|
||||
CEFRLevel string `json:"cefr_level"`
|
||||
Type string `json:"type"`
|
||||
PromptText string `json:"prompt_text"`
|
||||
TargetText string `json:"target_text"`
|
||||
Difficulty int `json:"difficulty"`
|
||||
Source string `json:"source,omitempty"`
|
||||
}
|
||||
|
||||
type WordScore struct {
|
||||
Word string `json:"word"`
|
||||
Accuracy float64 `json:"accuracy"`
|
||||
ErrorType string `json:"error_type,omitempty"`
|
||||
Phonemes []string `json:"phonemes,omitempty"`
|
||||
PhonemeScores []PhonemeScore `json:"phoneme_scores,omitempty"`
|
||||
Highlight string `json:"highlight"`
|
||||
AccuracyMeasured *bool `json:"accuracy_measured,omitempty"`
|
||||
Word string `json:"word"`
|
||||
Accuracy float64 `json:"accuracy"`
|
||||
ErrorType string `json:"error_type,omitempty"`
|
||||
Phonemes []string `json:"phonemes,omitempty"`
|
||||
PhonemeScores []PhonemeScore `json:"phoneme_scores,omitempty"`
|
||||
Highlight string `json:"highlight"`
|
||||
}
|
||||
|
||||
type PhonemeScore struct {
|
||||
Position *int `json:"position,omitempty"`
|
||||
Phoneme string `json:"phoneme"`
|
||||
Accuracy float64 `json:"accuracy"`
|
||||
Highlight string `json:"highlight"`
|
||||
@@ -95,30 +99,36 @@ type WeakPhoneme struct {
|
||||
}
|
||||
|
||||
type PronunciationResult struct {
|
||||
RecognizedText string `json:"recognized_text"`
|
||||
OverallScore float64 `json:"overall_score"`
|
||||
AccuracyScore float64 `json:"accuracy_score"`
|
||||
FluencyScore float64 `json:"fluency_score"`
|
||||
CompletenessScore float64 `json:"completeness_score"`
|
||||
ProsodyScore float64 `json:"prosody_score"`
|
||||
WordScores []WordScore `json:"word_scores"`
|
||||
Provider string `json:"provider"`
|
||||
Locale string `json:"locale,omitempty"`
|
||||
Alphabet string `json:"alphabet,omitempty"`
|
||||
Method string `json:"method,omitempty"`
|
||||
MeasurementVersion string `json:"measurement_version,omitempty"`
|
||||
RecognizedText string `json:"recognized_text"`
|
||||
OverallScore float64 `json:"overall_score"`
|
||||
AccuracyScore float64 `json:"accuracy_score"`
|
||||
FluencyScore float64 `json:"fluency_score"`
|
||||
CompletenessScore float64 `json:"completeness_score"`
|
||||
ProsodyScore float64 `json:"prosody_score"`
|
||||
WordScores []WordScore `json:"word_scores"`
|
||||
Provider string `json:"provider"`
|
||||
}
|
||||
|
||||
type Attempt struct {
|
||||
ID string `json:"id"`
|
||||
UserID string `json:"user_id"`
|
||||
ExerciseID string `json:"exercise_id"`
|
||||
TargetLanguage string `json:"target_language"`
|
||||
RecognizedText string `json:"recognized_text"`
|
||||
OverallScore float64 `json:"overall_score"`
|
||||
AccuracyScore float64 `json:"accuracy_score"`
|
||||
FluencyScore float64 `json:"fluency_score"`
|
||||
CompletenessScore float64 `json:"completeness_score"`
|
||||
ProsodyScore float64 `json:"prosody_score"`
|
||||
WordScores []WordScore `json:"word_scores"`
|
||||
TeacherFeedback string `json:"teacher_feedback"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
Provider string `json:"provider,omitempty"`
|
||||
Measurement *PronunciationResult `json:"-"`
|
||||
ID string `json:"id"`
|
||||
UserID string `json:"user_id"`
|
||||
ExerciseID string `json:"exercise_id"`
|
||||
TargetLanguage string `json:"target_language"`
|
||||
RecognizedText string `json:"recognized_text"`
|
||||
OverallScore float64 `json:"overall_score"`
|
||||
AccuracyScore float64 `json:"accuracy_score"`
|
||||
FluencyScore float64 `json:"fluency_score"`
|
||||
CompletenessScore float64 `json:"completeness_score"`
|
||||
ProsodyScore float64 `json:"prosody_score"`
|
||||
WordScores []WordScore `json:"word_scores"`
|
||||
TeacherFeedback string `json:"teacher_feedback"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
}
|
||||
|
||||
type ProgressSummary struct {
|
||||
@@ -131,31 +141,34 @@ type ProgressSummary struct {
|
||||
}
|
||||
|
||||
type GeneratedExerciseRequest struct {
|
||||
UserID string `json:"user_id"`
|
||||
Profile LearnerProfile `json:"profile"`
|
||||
Progress ProgressSummary `json:"progress"`
|
||||
TargetLanguage string `json:"target_language"`
|
||||
CEFRLevel string `json:"cefr_level"`
|
||||
UILanguage string `json:"ui_language"`
|
||||
SessionID string `json:"session_id"`
|
||||
RecentWeakWords []WordScore `json:"recent_weak_words"`
|
||||
PreferredType string `json:"preferred_type"`
|
||||
AvoidReferenceText string `json:"avoid_reference_text,omitempty"`
|
||||
AvoidReferenceTexts []string `json:"avoid_reference_texts,omitempty"`
|
||||
TrainingPlan *PronunciationPlan `json:"training_plan,omitempty"`
|
||||
UserID string `json:"user_id"`
|
||||
Profile LearnerProfile `json:"profile"`
|
||||
Progress ProgressSummary `json:"progress"`
|
||||
TargetLanguage string `json:"target_language"`
|
||||
CEFRLevel string `json:"cefr_level"`
|
||||
UILanguage string `json:"ui_language"`
|
||||
SessionID string `json:"session_id"`
|
||||
RecentWeakWords []WordScore `json:"recent_weak_words"`
|
||||
PreferredType string `json:"preferred_type"`
|
||||
AvoidReferenceText string `json:"avoid_reference_text,omitempty"`
|
||||
AvoidReferenceTexts []string `json:"avoid_reference_texts,omitempty"`
|
||||
}
|
||||
|
||||
type GeneratedExercise struct {
|
||||
ID string `json:"exercise_id"`
|
||||
ExerciseType string `json:"exercise_type"`
|
||||
TargetLanguage string `json:"target_language"`
|
||||
CEFRLevel string `json:"cefr_level"`
|
||||
ReferenceText string `json:"reference_text"`
|
||||
DisplayPrompt string `json:"display_prompt"`
|
||||
TTSText string `json:"tts_text"`
|
||||
FocusPoints []string `json:"focus_points"`
|
||||
SuccessCriteria []string `json:"success_criteria"`
|
||||
ReasonForChoice string `json:"reason_for_choice"`
|
||||
Source string `json:"source"`
|
||||
TrainingPlan *PronunciationPlan `json:"-"`
|
||||
CandidateWord string `json:"candidate_word,omitempty"`
|
||||
ID string `json:"exercise_id"`
|
||||
ExerciseType string `json:"exercise_type"`
|
||||
TargetLanguage string `json:"target_language"`
|
||||
CEFRLevel string `json:"cefr_level"`
|
||||
ReferenceText string `json:"reference_text"`
|
||||
DisplayPrompt string `json:"display_prompt"`
|
||||
TTSText string `json:"tts_text"`
|
||||
FocusPoints []string `json:"focus_points"`
|
||||
SuccessCriteria []string `json:"success_criteria"`
|
||||
ReasonForChoice string `json:"reason_for_choice"`
|
||||
Source string `json:"source"`
|
||||
}
|
||||
|
||||
type Dashboard struct {
|
||||
@@ -200,3 +213,54 @@ type DebugDBStatus struct {
|
||||
SeedExerciseCount int `json:"seed_exercise_count"`
|
||||
Error string `json:"error,omitempty"`
|
||||
}
|
||||
|
||||
type CourseModule struct {
|
||||
ID string `json:"id"`
|
||||
Title string `json:"title"`
|
||||
Description string `json:"description"`
|
||||
TargetLanguage string `json:"target_language"`
|
||||
CEFRLevel string `json:"cefr_level"`
|
||||
Version int `json:"version"`
|
||||
TaskCount int `json:"task_count"`
|
||||
AttemptedCount int `json:"attempted_count"`
|
||||
CorrectCount int `json:"correct_count"`
|
||||
}
|
||||
|
||||
type CourseTask struct {
|
||||
Source string `json:"source,omitempty"`
|
||||
ID string `json:"id"`
|
||||
ModuleID string `json:"module_id"`
|
||||
Skill string `json:"skill"`
|
||||
Kind string `json:"kind"`
|
||||
Prompt string `json:"prompt"`
|
||||
Passage string `json:"passage,omitempty"`
|
||||
Options []string `json:"options,omitempty"`
|
||||
PronunciationExercise *Exercise `json:"pronunciation_exercise,omitempty"`
|
||||
Attempted bool `json:"attempted"`
|
||||
Correct bool `json:"correct"`
|
||||
}
|
||||
|
||||
type CourseModuleDetail struct {
|
||||
Module CourseModule `json:"module"`
|
||||
Tasks []CourseTask `json:"tasks"`
|
||||
}
|
||||
|
||||
type CourseTaskKey struct {
|
||||
ID string
|
||||
ModuleID string
|
||||
Skill string
|
||||
Kind string
|
||||
AudioText string
|
||||
AcceptedAnswers []string
|
||||
Solution string
|
||||
Explanation string
|
||||
}
|
||||
|
||||
type CourseAttemptResult struct {
|
||||
ID string `json:"id"`
|
||||
TaskID string `json:"task_id"`
|
||||
Correct bool `json:"correct"`
|
||||
Solution string `json:"solution"`
|
||||
Explanation string `json:"explanation"`
|
||||
Transcript string `json:"transcript,omitempty"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user