debug(eo): log raw DeepSeek response on parse failure
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4fde66d930
commit
9420612abf
1 changed files with 14 additions and 1 deletions
|
|
@ -1094,7 +1094,20 @@ export async function correctEO(
|
|||
nclcCible,
|
||||
});
|
||||
const content = await callDeepSeek(system, user, 0.2);
|
||||
const parsed: unknown = JSON.parse(content);
|
||||
let parsed: unknown;
|
||||
try {
|
||||
parsed = JSON.parse(content);
|
||||
} catch (err) {
|
||||
// DEBUG temporaire — diagnostic JSON malformé reçu de DeepSeek sur EO.
|
||||
// À retirer une fois la cause identifiée.
|
||||
console.error("[correctEO] JSON.parse failed", {
|
||||
contentPreview: content.slice(0, 500),
|
||||
contentTail: content.slice(-200),
|
||||
contentLength: content.length,
|
||||
errorMessage: err instanceof Error ? err.message : String(err),
|
||||
});
|
||||
throw err;
|
||||
}
|
||||
return validateCorrectionRapportEO(parsed, nclcCible, transcript);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue