Show actual AI token usage and cost
This commit is contained in:
@@ -151,6 +151,9 @@ class ResultModel extends BaseDatabaseModel
|
||||
);
|
||||
$item->answers[$questionId]['ai_feedback'] = $aiResult['feedback'];
|
||||
$item->answers[$questionId]['awarded_points'] = $aiResult['awarded_points'];
|
||||
if ($aiResult['usage'] !== null) {
|
||||
$item->answers[$questionId]['ai_usage'] = $aiResult['usage'];
|
||||
}
|
||||
|
||||
$correctionPoints = 0;
|
||||
foreach ($item->answers as $savedAnswer) {
|
||||
|
||||
Reference in New Issue
Block a user