限制模型图片解析最多30s

This commit is contained in:
张松
2025-11-27 10:20:33 +08:00
parent 9c2133774e
commit aa83cf6d50
2 changed files with 3 additions and 2 deletions

View File

@@ -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;