From ebc7ae2cf9927af3693915f84c7620a3d96a5cd1 Mon Sep 17 00:00:00 2001 From: MartinDai Date: Wed, 22 May 2024 14:01:08 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=9B=E4=B8=80=E6=AD=A5=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E5=A4=A7=E6=A8=A1=E5=9E=8B=E6=9C=8D=E5=8A=A1=E7=9A=84=E5=93=8D?= =?UTF-8?q?=E5=BA=94=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wechatrobot/service/assistant/impl/DashscopeService.java | 2 +- .../wechatrobot/service/assistant/impl/OpenAIService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/robot-web/src/main/java/com/doodl6/wechatrobot/service/assistant/impl/DashscopeService.java b/robot-web/src/main/java/com/doodl6/wechatrobot/service/assistant/impl/DashscopeService.java index a84af24..2bd8080 100644 --- a/robot-web/src/main/java/com/doodl6/wechatrobot/service/assistant/impl/DashscopeService.java +++ b/robot-web/src/main/java/com/doodl6/wechatrobot/service/assistant/impl/DashscopeService.java @@ -34,7 +34,7 @@ public BaseMessage processText(String content, String fromUserName) { try { Generation gen = new Generation(); - Message systemMsg = Message.builder().role(Role.SYSTEM.getValue()).content("你是一个AI助手,保持回复内容尽量简短").build(); + Message systemMsg = Message.builder().role(Role.SYSTEM.getValue()).content("你是一个AI助手,尽量保证回复内容在200个字符以内").build(); Message userMsg = Message.builder().role(Role.USER.getValue()).content(content).build(); GenerationParam param = GenerationParam.builder().model(Generation.Models.QWEN_TURBO).messages(Lists.newArrayList(systemMsg, userMsg)) diff --git a/robot-web/src/main/java/com/doodl6/wechatrobot/service/assistant/impl/OpenAIService.java b/robot-web/src/main/java/com/doodl6/wechatrobot/service/assistant/impl/OpenAIService.java index 2544df1..8e8c758 100644 --- a/robot-web/src/main/java/com/doodl6/wechatrobot/service/assistant/impl/OpenAIService.java +++ b/robot-web/src/main/java/com/doodl6/wechatrobot/service/assistant/impl/OpenAIService.java @@ -89,7 +89,7 @@ public BaseMessage processText(String content, String fromUserName) { ChatMessage systemMsg = new ChatMessage(); systemMsg.setRole("system"); - systemMsg.setContent("你是一个AI助手,保持回复内容尽量简短"); + systemMsg.setContent("你是一个AI助手,尽量保证回复内容在200个字符以内"); ChatMessage userMsg = new ChatMessage(); userMsg.setRole("user");