diff --git a/api-web/api-interface/src/main/java/com/heyu/api/controller/ocr/AIOcrController.java b/api-web/api-interface/src/main/java/com/heyu/api/controller/ocr/AIOcrController.java index d0168ce..2b8f26c 100644 --- a/api-web/api-interface/src/main/java/com/heyu/api/controller/ocr/AIOcrController.java +++ b/api-web/api-interface/src/main/java/com/heyu/api/controller/ocr/AIOcrController.java @@ -106,6 +106,27 @@ public class AIOcrController { } + // http://localhost:8888/ai/precision/orc/recognize?imageBase64=3232 + // https://heyuoss.oss-cn-shanghai.aliyuncs.com/prd/testxxx.jpg + + /*** + * + / 4. document_parsing : 文档解析 + /** + * 模型支持解析以图像形式存储的扫描件或PDF文档,能识别文件中的标题、摘要、标签等,以带有LaTeX格式的文本返回识别结果。 + */ + @EbAuthentication(tencent = ApiConstants.TENCENT_AUTH) + @RequestMapping("/text/recognition") + public R text_recognition(@RequestBody AIOcrRequest aiOcrRequest) throws Exception { + ModelResult modelResult = LLMUtils.callOcr(aiOcrRequest.getImageUrl(), aiOcrRequest.getImageBase64(), + AlibabaOCREnums.text_recognition); + Map data = new HashMap<>(); + data.put("content", modelResult.getResult()); + return R.ok().setData(data); + } + + + // http://localhost:8888/ai/precision/orc/recognize?imageBase64=3232 // https://heyuoss.oss-cn-shanghai.aliyuncs.com/prd/testxxx.jpg // 5. formula_recognition: 公式识别