Update: 2026-05-12 01:29:57

This commit is contained in:
Hamza-Ayed
2026-05-12 01:29:57 +03:00
parent d6cedd23c1
commit ae5eba09aa
4 changed files with 23 additions and 48 deletions

View File

@@ -96,6 +96,10 @@ class AI
$textResponse = $result['candidates'][0]['content']['parts'][0]['text'] ?? null;
if (!$textResponse) return null;
// --- ADDED FOR DEBUGGING ---
@file_put_contents(STORAGE_PATH . '/logs/worker.log', "[" . date('Y-m-d H:i:s') . "] [AI_RAW_RESPONSE]\n" . $textResponse . "\n", FILE_APPEND);
// ---------------------------
$data = json_decode($textResponse, true);
if (isset($data['error']) && $data['error'] === 'invalid_invoice') {