Skip to content

Commit 9594b4f

Browse files
committed
fix: improve problem list population in custom split strategy
--bug=1064029 --user=刘瑞斌 【知识库】工作流知识库使用高级分段时,开启文档标题或名称关联问题开关,分段失败 https://www.tapd.cn/62980211/s/1805605
1 parent 517a4de commit 9594b4f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

apps/application/flow/step_node/document_split_node/impl/base_document_split_node.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ def _generate_problem_list(
147147
if document_name_relate_problem and document_name:
148148
problem_list.append(document_name)
149149
elif split_strategy == 'custom':
150-
if paragraph_title_relate_problem:
151-
problem_list.extend(paragraph_title_relate_problem)
152-
if document_name_relate_problem:
153-
problem_list.extend(document_name_relate_problem)
150+
if paragraph_title_relate_problem and paragraph.get('title'):
151+
problem_list.extend(paragraph.get('title'))
152+
if document_name_relate_problem and document_name:
153+
problem_list.extend(document_name)
154154
elif split_strategy == 'qa':
155155
if document_name_relate_problem and document_name:
156156
problem_list.append(document_name)

0 commit comments

Comments
 (0)