[BUG] 修复csv文件读取后,单行数据被分成多段。

This commit is contained in:
imClumsyPanda 2023-08-26 11:45:01 +08:00
parent fea7e8ddf1
commit f95d41ef47
1 changed files with 23 additions and 20 deletions

View File

@ -104,6 +104,9 @@ class KnowledgeFile:
else:
loader = DocumentLoader(self.filepath)
if self.ext in ".csv":
docs = loader.load()
else:
try:
if self.text_splitter_name is None:
text_splitter_module = importlib.import_module('langchain.text_splitter')