From 2e4dca2d6f7c6e8fe88c667e443dfb18f3b882f4 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 18 Apr 2024 17:10:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=20chat=20old=E5=AF=B9?= =?UTF-8?q?=E8=AF=9D=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/ai/service/impl/ChatServiceImpl.java | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java index 913944dc0..069de7092 100644 --- a/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java +++ b/yudao-module-ai/yudao-module-ai-biz/src/main/java/cn/iocoder/yudao/module/ai/service/impl/ChatServiceImpl.java @@ -13,7 +13,6 @@ import cn.iocoder.yudao.module.ai.dataobject.AiChatConversationDO; import cn.iocoder.yudao.module.ai.dataobject.AiChatMessageDO; import cn.iocoder.yudao.module.ai.dataobject.AiChatRoleDO; import cn.iocoder.yudao.module.ai.enums.AiClientNameEnum; -import cn.iocoder.yudao.module.ai.enums.ChatConversationTypeEnum; import cn.iocoder.yudao.module.ai.enums.ChatTypeEnum; import cn.iocoder.yudao.module.ai.mapper.AiChatConversationMapper; import cn.iocoder.yudao.module.ai.mapper.AiChatMessageMapper; @@ -121,21 +120,6 @@ public class ChatServiceImpl implements ChatService { aiChatConversationMapper.updateIncrChatCount(req.getConversationId()); } - private AiChatConversationDO getChatConversationNoExistToCreate(ChatReq req, ChatConversationTypeEnum chatConversationTypeEnum, Long loginUserId) { - AiChatConversationDO aiChatConversationDO; - if (ChatConversationTypeEnum.NEW == chatConversationTypeEnum) { - // 创建一个新的对话 - aiChatConversationDO = createNewChatConversation(req, loginUserId); - } else { - // 继续对话 - if (req.getConversationId() == null) { - throw new ServerException(ErrorCodeConstants.AI_CHAT_CONTINUE_CONVERSATION_ID_NOT_NULL); - } - aiChatConversationDO = aiChatConversationMapper.selectById(req.getConversationId()); - } - return aiChatConversationDO; - } - private AiChatConversationDO createNewChatConversation(ChatReq req, Long loginUserId) { // 获取 chat 角色 String chatRoleName = null;