Commit 2e4dca2d6f7c6e8fe88c667e443dfb18f3b882f4
1 parent
25523fd5
删除 chat old对话逻辑
Showing
1 changed file
with
0 additions
and
16 deletions
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; |
| 13 | 13 | import cn.iocoder.yudao.module.ai.dataobject.AiChatMessageDO; |
| 14 | 14 | import cn.iocoder.yudao.module.ai.dataobject.AiChatRoleDO; |
| 15 | 15 | import cn.iocoder.yudao.module.ai.enums.AiClientNameEnum; |
| 16 | -import cn.iocoder.yudao.module.ai.enums.ChatConversationTypeEnum; | |
| 17 | 16 | import cn.iocoder.yudao.module.ai.enums.ChatTypeEnum; |
| 18 | 17 | import cn.iocoder.yudao.module.ai.mapper.AiChatConversationMapper; |
| 19 | 18 | import cn.iocoder.yudao.module.ai.mapper.AiChatMessageMapper; |
| ... | ... | @@ -121,21 +120,6 @@ public class ChatServiceImpl implements ChatService { |
| 121 | 120 | aiChatConversationMapper.updateIncrChatCount(req.getConversationId()); |
| 122 | 121 | } |
| 123 | 122 | |
| 124 | - private AiChatConversationDO getChatConversationNoExistToCreate(ChatReq req, ChatConversationTypeEnum chatConversationTypeEnum, Long loginUserId) { | |
| 125 | - AiChatConversationDO aiChatConversationDO; | |
| 126 | - if (ChatConversationTypeEnum.NEW == chatConversationTypeEnum) { | |
| 127 | - // 创建一个新的对话 | |
| 128 | - aiChatConversationDO = createNewChatConversation(req, loginUserId); | |
| 129 | - } else { | |
| 130 | - // 继续对话 | |
| 131 | - if (req.getConversationId() == null) { | |
| 132 | - throw new ServerException(ErrorCodeConstants.AI_CHAT_CONTINUE_CONVERSATION_ID_NOT_NULL); | |
| 133 | - } | |
| 134 | - aiChatConversationDO = aiChatConversationMapper.selectById(req.getConversationId()); | |
| 135 | - } | |
| 136 | - return aiChatConversationDO; | |
| 137 | - } | |
| 138 | - | |
| 139 | 123 | private AiChatConversationDO createNewChatConversation(ChatReq req, Long loginUserId) { |
| 140 | 124 | // 获取 chat 角色 |
| 141 | 125 | String chatRoleName = null; | ... | ... |