限制模型图片解析最多30s
This commit is contained in:
@@ -100,7 +100,8 @@ public class AliOcrUtil {
|
||||
// 复制代码运行请自行打印 API 的返回值
|
||||
AddFileResponse addFileResponse = client.addFileWithOptions("llm-9zg04s7wlbvi32tq", addFileRequest, headers, runtime);
|
||||
String fileId = addFileResponse.getBody().getData().getFileId();
|
||||
while (!getFileStatus(fileId)) {
|
||||
int count = 0;
|
||||
while (!getFileStatus(fileId) && count++ < 300) {
|
||||
Thread.sleep(100);
|
||||
}
|
||||
return fileId;
|
||||
|
||||
@@ -283,7 +283,7 @@
|
||||
String md5 = DigestUtil.md5Hex(readAllBytes);
|
||||
MkOcr ocr = ocrService.getOne(new QueryWrapper().eq(MkOcr::getShopId, shopId).eq(MkOcr::getMd5, md5));
|
||||
if (ocr != null) {
|
||||
// return ocr.getId();
|
||||
return ocr.getId();
|
||||
}
|
||||
MkOcr mkOcr = new MkOcr();
|
||||
mkOcr.setShopId(shopId);
|
||||
|
||||
Reference in New Issue
Block a user