fix:【AI】检索 documents 无数据时调用召回会报错

This commit is contained in:
YunaiV 2025-11-21 20:27:27 +08:00
parent 65e1d34e85
commit 696c91dfec

View File

@ -227,6 +227,9 @@ public class AiKnowledgeSegmentServiceImpl implements AiKnowledgeSegmentService
// 2. 检索
List<Document> documents = searchDocument(knowledge, reqBO);
if (CollUtil.isEmpty(documents)) {
return ListUtil.empty();
}
// 3.1 段落召回
List<AiKnowledgeSegmentDO> segments = segmentMapper