fix: generate exercise with AI bug (#331)
This commit is contained in:
+2
-1
@@ -76,7 +76,8 @@
|
||||
if (!$lesson.id) return;
|
||||
|
||||
toggleConfetti();
|
||||
const template: ExerciseTemplate = JSON.parse($completion);
|
||||
const responseData = $completion.replace('```json', '').replace('```', '');
|
||||
const template: ExerciseTemplate = JSON.parse(responseData);
|
||||
await handleTemplateCreate(template);
|
||||
toggleConfetti();
|
||||
$isLoading = false;
|
||||
|
||||
Reference in New Issue
Block a user