mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-26 09:11:52 +08:00
【解决todo】如果默认选择了 role ,则使用 role 作为 title
This commit is contained in:
parent
19bd0c66ff
commit
041a00b27f
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user