fix: 新增对话进行问答时,toolNames cannot be null的问题
This commit is contained in:
parent
a9eaa3ed74
commit
0eee20ef20
|
@ -246,7 +246,7 @@ public class AiChatMessageServiceImpl implements AiChatMessageService {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 2.1 查询 tool 工具
|
// 2.1 查询 tool 工具
|
||||||
Set<String> toolNames = null;
|
Set<String> toolNames = Collections.emptySet();
|
||||||
if (conversation.getRoleId() != null) {
|
if (conversation.getRoleId() != null) {
|
||||||
AiChatRoleDO chatRole = chatRoleService.getChatRole(conversation.getRoleId());
|
AiChatRoleDO chatRole = chatRoleService.getChatRole(conversation.getRoleId());
|
||||||
if (chatRole != null && CollUtil.isNotEmpty(chatRole.getToolIds())) {
|
if (chatRole != null && CollUtil.isNotEmpty(chatRole.getToolIds())) {
|
||||||
|
|
Loading…
Reference in New Issue