fix: 新增对话进行问答时,toolNames cannot be null的问题

This commit is contained in:
Ren 2025-03-15 18:20:31 +08:00
parent a9eaa3ed74
commit 0eee20ef20
1 changed files with 1 additions and 1 deletions

View File

@ -246,7 +246,7 @@ public class AiChatMessageServiceImpl implements AiChatMessageService {
}
// 2.1 查询 tool 工具
Set<String> toolNames = null;
Set<String> toolNames = Collections.emptySet();
if (conversation.getRoleId() != null) {
AiChatRoleDO chatRole = chatRoleService.getChatRole(conversation.getRoleId());
if (chatRole != null && CollUtil.isNotEmpty(chatRole.getToolIds())) {