R77-A1: 修复腾讯OCR的PDF识别链路
这个提交包含在:
@@ -34,7 +34,7 @@ function buildMissingRequiredOcrError(ocrType, normalized) {
|
||||
return `missing_required_fields:${missingFields.join(",")}`;
|
||||
}
|
||||
|
||||
async function runOcrForInvoice({ config, ocrType, imageBase64 }) {
|
||||
async function runOcrForInvoice({ config, ocrType, imageBase64, sourceMimeType }) {
|
||||
if (config.ocrProvider === "mock") {
|
||||
return runMockOcr({ ocrType, imageBase64 });
|
||||
}
|
||||
@@ -47,7 +47,7 @@ async function runOcrForInvoice({ config, ocrType, imageBase64 }) {
|
||||
throw new Error(`Unsupported OCR type: ${ocrType}`);
|
||||
}
|
||||
|
||||
return runTencentVatOcr(config, imageBase64);
|
||||
return runTencentVatOcr(config, { imageBase64, sourceMimeType });
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
|
||||
在新工单中引用
屏蔽一个用户