Updated a bit more of the evaluation

This commit is contained in:
Tiago Ribeiro
2023-10-07 10:18:51 +01:00
parent 5e1b9ce2c7
commit ebe4c41f76

View File

@@ -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: {