mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: improve problem list population in custom split strategy
--bug=1064029 --user=刘瑞斌 【知识库】工作流知识库使用高级分段时,开启文档标题或名称关联问题开关,分段失败 https://www.tapd.cn/62980211/s/1805605
This commit is contained in:
parent
517a4de54e
commit
9594b4fef6
|
|
@ -147,10 +147,10 @@ class BaseDocumentSplitNode(IDocumentSplitNode):
|
|||
if document_name_relate_problem and document_name:
|
||||
problem_list.append(document_name)
|
||||
elif split_strategy == 'custom':
|
||||
if paragraph_title_relate_problem:
|
||||
problem_list.extend(paragraph_title_relate_problem)
|
||||
if document_name_relate_problem:
|
||||
problem_list.extend(document_name_relate_problem)
|
||||
if paragraph_title_relate_problem and paragraph.get('title'):
|
||||
problem_list.extend(paragraph.get('title'))
|
||||
if document_name_relate_problem and document_name:
|
||||
problem_list.extend(document_name)
|
||||
elif split_strategy == 'qa':
|
||||
if document_name_relate_problem and document_name:
|
||||
problem_list.append(document_name)
|
||||
|
|
|
|||
Loading…
Reference in New Issue