690604:1107 ADR-034-134 #06
CI / CD Pipeline / build (push) Successful in 5m32s
CI / CD Pipeline / deploy (push) Successful in 3m41s

This commit is contained in:
2026-06-04 11:07:29 +07:00
parent 994b41aa37
commit 4d243c16e6
2 changed files with 11 additions and 1 deletions
@@ -452,6 +452,9 @@ export class AiBatchProcessor extends WorkerHost {
const { idempotencyKey, payload } = data;
const pdfPath = payload.pdfPath as string;
const engineType = (payload.engineType as SandboxOcrEngineType) || 'auto';
const typhoonOptions = payload.typhoonOptions as
| { temperature?: number; topP?: number; repeatPenalty?: number }
| undefined;
if (!pdfPath) {
throw new Error('pdfPath is required for sandbox-ocr-only job');
@@ -469,7 +472,8 @@ export class AiBatchProcessor extends WorkerHost {
try {
const ocrResult = await this.sandboxOcrEngineService.detectAndExtract(
pdfPath,
engineType
engineType,
typhoonOptions
);
// Cache OCR text สำหรับ Step 2