浏览代码

update qwen-vl-ocr-latest Prompt

deason 2 周之前
父节点
当前提交
f05c128c75
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      src/main/java/com/qmth/ops/biz/ai/client/aliyun/qwen_ocr/QwenOcrClient.java

+ 5 - 3
src/main/java/com/qmth/ops/biz/ai/client/aliyun/qwen_ocr/QwenOcrClient.java

@@ -34,8 +34,9 @@ public class QwenOcrClient extends OcrApiClient {
     @Override
     protected Request buildRequest(OcrType type, byte[] image, ImageType imageType) throws Exception {
         Map<String, Object> request = new HashMap<>();
-        request.put("model", "qwen-vl-ocr");
-        // request.put("model", "qwen-vl-ocr-latest");
+        // request.put("model", "qwen-vl-ocr");
+        // request.put("model", "qwen-vl-ocr-2025-04-13");
+        request.put("model", "qwen-vl-ocr-latest");
 
         List<Map<String, Object>> messages = new ArrayList<>();
         Map<String, Object> message = new HashMap<>();
@@ -57,7 +58,8 @@ public class QwenOcrClient extends OcrApiClient {
 
         Map<String, Object> content2 = new HashMap<>();
         content2.put("type", "text");
-        content2.put("text", "Read all the text in the image.");
+        // content2.put("text", "Read all the text in the image.");
+        content2.put("text", "这是一张考生答题卡扫描图。请原样输出图片中不带删除线的可见文字内容。不要对文字的语法错误、拼写错误进行修正,也不要补充缺失的标点或内容,更不要编造不存在的文字信息。");
         contents.add(content2);
 
         messages.add(message);