package services import "speech-learning-api/internal/domain" // Make the distinction between transcript-based language assessment and Azure's // acoustic measurement explicit. The original task and frozen rubric remain // authoritative; this never replaces an answer with the reference example. func courseEvaluationInput(task domain.AdaptiveTask, attempt domain.AdaptiveAttempt, language, uiLanguage string) map[string]any { input := map[string]any{"schema_version": 2, "target_language": language, "ui_language": uiLanguage, "task": task, "answer": attempt.Answer, "speech": attempt.Speech, "rubric": task.AnswerKey.Rubric} if task.Kind == "free_speech" { input["evaluation_scope"] = "content_and_language" input["answer_source"] = "speech_transcript" input["pronunciation_displayed_separately"] = true } return input }