fix(MinerU): remove check quota (#7804)

fix: remove check quota
This commit is contained in:
Chen Tao 2025-07-04 17:47:52 +08:00 committed by GitHub
parent 8cfe6a5848
commit e5d94d9a53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -111,7 +111,6 @@ export default class MineruPreprocessProvider extends BasePreprocessProvider {
}
private async validateFile(filePath: string): Promise<void> {
const quota = await this.checkQuota()
const pdfBuffer = await fs.promises.readFile(filePath)
const doc = await this.readPdf(new Uint8Array(pdfBuffer))
@ -125,10 +124,6 @@ export default class MineruPreprocessProvider extends BasePreprocessProvider {
const fileSizeMB = Math.round(pdfBuffer.length / (1024 * 1024))
throw new Error(`PDF file size (${fileSizeMB}MB) exceeds the limit of 200MB`)
}
// 检查配额
if (quota <= 0 || quota - doc.numPages <= 0) {
throw new Error('MinerU解析配额不足请申请企业账户或自行部署剩余额度' + quota)
}
}
private createProcessedFileInfo(file: FileMetadata, outputPath: string): FileMetadata {