Skip to content

Commit

Permalink
进一步优化大模型服务的响应内容
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinDai committed May 22, 2024
1 parent 2c01463 commit ebc7ae2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit ebc7ae2

Please sign in to comment.