mirror of
https://github.com/RYDE-WORK/Langchain-Chatchat.git
synced 2026-02-05 22:33:24 +08:00
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…
x
Reference in New Issue
Block a user