diff --git a/src/main/java/com/ai/da/service/impl/GenerateServiceImpl.java b/src/main/java/com/ai/da/service/impl/GenerateServiceImpl.java index 7a6dccbf..b4b33323 100644 --- a/src/main/java/com/ai/da/service/impl/GenerateServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/GenerateServiceImpl.java @@ -847,7 +847,7 @@ public class GenerateServiceImpl extends ServiceImpl i } } else if (finishReason != null && finishReason.equals("IMAGE_SAFETY")) { String finishMessage = candidate.getString("finishMessage"); - if (finishMessage != null && finishMessage.contains("Try rephrasing the prompt or ")) { + if (finishMessage != null && finishMessage.contains("Try rephrasing the prompt")) { finishMessage = "Try rephrasing the prompt or modifying the model image. If you think this was an error, send feedback."; LambdaQueryWrapper select = new LambdaQueryWrapper().eq(Account::getId, userId).select(Account::getLanguage); Account account = accountService.getOne(select); @@ -1112,7 +1112,7 @@ public class GenerateServiceImpl extends ServiceImpl i } } else if (finishReason != null && finishReason.equals("IMAGE_SAFETY")) { String finishMessage = candidate.getString("finishMessage"); - if (finishMessage != null && finishMessage.contains("Try rephrasing the prompt or ")) { + if (finishMessage != null && finishMessage.contains("Try rephrasing the prompt")) { finishMessage = "Try rephrasing the prompt or replacing the image. If you think this was an error, send feedback."; LambdaQueryWrapper select = new LambdaQueryWrapper().eq(Account::getId, userId).select(Account::getLanguage); Account account = accountService.getOne(select);