update: add response on function submit assessment to generate feedback

This commit is contained in:
abiyasa05 2025-06-25 09:40:04 +07:00
parent 5b145bed94
commit d320bc795a

View File

@ -248,6 +248,7 @@ public function submitAssessment($id)
$apiResponse = Http::timeout(10)->post('http://127.0.0.1:8010/generate-feedback/', [ $apiResponse = Http::timeout(10)->post('http://127.0.0.1:8010/generate-feedback/', [
'user_answer' => $answer->answer_text, 'user_answer' => $answer->answer_text,
'expected_answer' => $bestMatch, 'expected_answer' => $bestMatch,
'question_text' => $question->question_text,
]); ]);
if ($apiResponse->ok()) { if ($apiResponse->ok()) {