Skip to content

Commit 5e499e6

Browse files
authored
fix: PDF上传知识库开始导入接口报错 #122 (#125)
1 parent 5b7ae29 commit 5e499e6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

apps/common/util/split_model.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ def parse(self, text: str):
336336
:return: 解析后数据 {content:段落数据,keywords:[‘段落关键词’],parent_chain:['段落父级链路']}
337337
"""
338338
text = text.replace('\r', '\n')
339+
text = text.replace("\0", '')
339340
result_tree = self.parse_to_tree(text, 0)
340341
result = result_tree_to_paragraph(result_tree, [], [])
341342
return [item for item in [self.post_reset_paragraph(row) for row in result] if

0 commit comments

Comments
 (0)