谷歌模型错误提示词修改
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user