Update Saqel Platform: 2026-09-08 18:19:28
This commit is contained in:
@@ -78,7 +78,7 @@ class AiVideoAnalyzerService
|
||||
$report = json_decode($text, true);
|
||||
if ($code !== 200 || !is_array($report) || !in_array($report['decision'] ?? '', ['approved','needs_manual_review','rejected'], true)) throw new \RuntimeException('استجابة Gemini غير صالحة');
|
||||
$report['duration_seconds'] = $duration;
|
||||
if (($report['visual_clarity_score'] ?? 0) < 70 || ($report['pedagogical_readiness_score'] ?? 0) < 70) $report['decision'] = 'needs_manual_review';
|
||||
if (($report['visual_clarity_score'] ?? 0) < 85 || ($report['pedagogical_readiness_score'] ?? 0) < 85) $report['decision'] = 'needs_manual_review';
|
||||
return $report;
|
||||
} catch (\Throwable $e) {
|
||||
return ['decision' => 'needs_manual_review', 'reason' => 'تعذر إكمال تحليل Gemini؛ لم يتم رفع الفيديو'];
|
||||
|
||||
Reference in New Issue
Block a user