mirror of
https://github.com/RYDE-WORK/Langchain-Chatchat.git
synced 2026-01-19 21:37:20 +08:00
fix: empty docs error in KnowledgeFile
This commit is contained in:
parent
7d580d9a47
commit
509dee0425
@ -311,6 +311,9 @@ class KnowledgeFile:
|
||||
else:
|
||||
docs = text_splitter.split_documents(docs)
|
||||
|
||||
if not docs:
|
||||
return []
|
||||
|
||||
print(f"文档切分示例:{docs[0]}")
|
||||
if zh_title_enhance:
|
||||
docs = func_zh_title_enhance(docs)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user