mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: 修复知识库导出后再导入,有一部分内容会丢失
This commit is contained in:
parent
9fc2d4a2e1
commit
fda0bcb5d6
|
|
@ -52,7 +52,7 @@ class CsvParseQAHandle(BaseParseQAHandle):
|
|||
title = get_row_value(row, title_row_index_dict, 'title')
|
||||
title = str(title) if title is not None else ''
|
||||
paragraph_list.append({'title': title[0:255],
|
||||
'content': content[0:4096],
|
||||
'content': content[0:102400],
|
||||
'problem_list': problem_list})
|
||||
return [{'name': file.name, 'paragraphs': paragraph_list}]
|
||||
except Exception as e:
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ def handle_sheet(file_name, sheet):
|
|||
title = str(title) if title is not None else ''
|
||||
content = str(content)
|
||||
paragraph_list.append({'title': title[0:255],
|
||||
'content': content[0:4096],
|
||||
'content': content[0:102400],
|
||||
'problem_list': problem_list})
|
||||
return {'name': file_name, 'paragraphs': paragraph_list}
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ def handle_sheet(file_name, sheet, image_dict):
|
|||
if image is not None:
|
||||
content = f''
|
||||
paragraph_list.append({'title': title[0:255],
|
||||
'content': content[0:4096],
|
||||
'content': content[0:102400],
|
||||
'problem_list': problem_list})
|
||||
return {'name': file_name, 'paragraphs': paragraph_list}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue