diff --git a/src/utils/evaluation.ts b/src/utils/evaluation.ts index 5a1c1507..b64b96ec 100644 --- a/src/utils/evaluation.ts +++ b/src/utils/evaluation.ts @@ -51,7 +51,10 @@ const evaluateSpeakingExercise = async (exercise: SpeakingExercise, exerciseId: const formData = new FormData(); formData.append("audio", audioFile, "audio.wav"); - formData.append("question", `${exercise.text.replaceAll("\n", "")} You should talk about: ${exercise.prompts.join(", ")}`); + + const evaluationQuestion = + `${exercise.text.replaceAll("\n", "")}` + (exercise.prompts.length > 0 ? `You should talk about: ${exercise.prompts.join(", ")}` : ""); + formData.append("question", evaluationQuestion); const config = { headers: {