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