谷歌模型错误提示词修改

This commit is contained in:
litianxiang
2025-10-15 10:35:59 +08:00
parent 3b6a9882d2
commit c9f9ef0ce2

View File

@@ -847,7 +847,7 @@ public class GenerateServiceImpl extends ServiceImpl<GenerateMapper, Generate> 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<Account> select = new LambdaQueryWrapper<Account>().eq(Account::getId, userId).select(Account::getLanguage);
Account account = accountService.getOne(select);
@@ -1112,7 +1112,7 @@ public class GenerateServiceImpl extends ServiceImpl<GenerateMapper, Generate> 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<Account> select = new LambdaQueryWrapper<Account>().eq(Account::getId, userId).select(Account::getLanguage);
Account account = accountService.getOne(select);