fix: empty docs error in KnowledgeFile
This commit is contained in:
parent
7d580d9a47
commit
509dee0425
|
|
@ -311,6 +311,9 @@ class KnowledgeFile:
|
||||||
else:
|
else:
|
||||||
docs = text_splitter.split_documents(docs)
|
docs = text_splitter.split_documents(docs)
|
||||||
|
|
||||||
|
if not docs:
|
||||||
|
return []
|
||||||
|
|
||||||
print(f"文档切分示例:{docs[0]}")
|
print(f"文档切分示例:{docs[0]}")
|
||||||
if zh_title_enhance:
|
if zh_title_enhance:
|
||||||
docs = func_zh_title_enhance(docs)
|
docs = func_zh_title_enhance(docs)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue