fix: 修复知识库导出后再导入,有一部分内容会丢失

This commit is contained in:
shaohuzhang1 2024-09-20 16:19:07 +08:00 committed by shaohuzhang1
parent 9fc2d4a2e1
commit fda0bcb5d6
3 changed files with 3 additions and 3 deletions

View File

@ -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:

View File

@ -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}

View File

@ -39,7 +39,7 @@ def handle_sheet(file_name, sheet, image_dict):
if image is not None:
content = f'![](/api/image/{image.id})'
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}