Merge branch 'develop' of bitbucket.org:ecropdev/ielts-ui into develop
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { UserSolution } from "@/interfaces/exam";
|
||||
export default function ai_usage(solutions: UserSolution[]): number {
|
||||
return solutions.reduce((max, solution) => {
|
||||
if (solution.type == "writing") {
|
||||
if (solution.type == "writing" && solution && solution.solutions[0] && solution.solutions[0].evaluation && solution.solutions[0].evaluation.ai_detection) {
|
||||
const aiUse = solution.solutions[0].evaluation?.ai_detection?.class_probabilities["ai"];
|
||||
return aiUse !== undefined ? Math.max(max, aiUse) : max;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user