From 041a00b27fa94c662485c0682495494a828b9136 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Tue, 21 May 2024 17:18:33 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E8=A7=A3=E5=86=B3todo=E3=80=91?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E9=BB=98=E8=AE=A4=E9=80=89=E6=8B=A9=E4=BA=86?= =?UTF-8?q?=20role=20=EF=BC=8C=E5=88=99=E4=BD=BF=E7=94=A8=20role=20?= =?UTF-8?q?=E4=BD=9C=E4=B8=BA=20title?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/service/chat/AiChatConversationServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java index 85dd57afd..1e3bd52ce 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/chat/AiChatConversationServiceImpl.java @@ -56,8 +56,9 @@ public class AiChatConversationServiceImpl implements AiChatConversationService validateChatModel(model); // 2. 创建 AiChatConversationDO 聊天对话 + String title = createReqVO.getRoleId() == null ? AiChatConversationDO.TITLE_DEFAULT : role.getName(); AiChatConversationDO conversation = new AiChatConversationDO() - .setUserId(userId).setTitle(AiChatConversationDO.TITLE_DEFAULT).setPinned(false) + .setUserId(userId).setTitle(title).setPinned(false) .setRoleId(role.getId()).setModelId(model.getId()).setModel(model.getModel()).setSystemMessage(role.getSystemMessage()) .setTemperature(model.getTemperature()).setMaxTokens(model.getMaxTokens()).setMaxContexts(model.getMaxContexts()); chatConversationMapper.insert(conversation);