Update im KI-Backend für pdf-import
CI / build-and-test (push) Canceled after 0s

This commit is contained in:
2026-08-31 23:20:19 +02:00
parent e2e2bfb854
commit 4b4a746e17
5 changed files with 40 additions and 5 deletions
+1 -2
View File
@@ -48,7 +48,7 @@ PROMPT;
$result = ai_backend_call_and_charge($pdo, $config, $user, $systemPrompt,
json_encode($body, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES));
$parsed = json_decode($result['content'], true);
$parsed = ai_backend_decode_json_response($result['content']);
if (!is_array($parsed) || !is_array($parsed['classifications'] ?? null)) {
ai_backend_fail(502, 'Die KI hat kein gültiges Klassifikations-JSON geliefert.');
}
@@ -78,4 +78,3 @@ foreach ($parsed['classifications'] as $classification) {
}
echo json_encode(['classifications' => $parsed['classifications']], JSON_UNESCAPED_UNICODE);