Bladeren bron

GzhReplyVideoRefreshJob title cover

wangyunpeng 5 uur geleden
bovenliggende
commit
f20a821a87

+ 1 - 0
api-module/src/main/java/com/tzld/piaoquan/api/job/GzhReplyVideoRefreshJob.java

@@ -186,6 +186,7 @@ public class GzhReplyVideoRefreshJob {
                     String prompt = "识别图片里的文字,直接输出图片里的文字标题,但是不要输出图片里右下角的字,比如“点开看看”“看这里”等,仅输出标题,不要有多余的文字输出";
                     String prompt = "识别图片里的文字,直接输出图片里的文字标题,但是不要输出图片里右下角的字,比如“点开看看”“看这里”等,仅输出标题,不要有多余的文字输出";
                     GoogleLLMResult result = aigcApiService.gemini("gemini-2.0-flash", prompt, Arrays.asList(ossImageUrl));
                     GoogleLLMResult result = aigcApiService.gemini("gemini-2.0-flash", prompt, Arrays.asList(ossImageUrl));
                     String text = result.getResult();
                     String text = result.getResult();
+                    text = text.replaceAll("\\n", "");
                     for (String existText : creativeIdTextMap.keySet()) {
                     for (String existText : creativeIdTextMap.keySet()) {
                         if (TitleSimilarCheckUtil.isSimilar(text, existText, TitleSimilarCheckUtil.SIMILARITY_THRESHOLD)) {
                         if (TitleSimilarCheckUtil.isSimilar(text, existText, TitleSimilarCheckUtil.SIMILARITY_THRESHOLD)) {
                             text = existText;
                             text = existText;