mirror of
https://github.com/QuivrHQ/quivr.git
synced 2024-08-16 18:00:23 +03:00
feat: Update file loading logic in File model (#2857)
This commit is contained in:
parent
5cc1ae5423
commit
77e1cfb77f
@ -42,7 +42,8 @@ class File(BaseModel):
|
||||
"""
|
||||
logger.info(f"Computing documents from file {self.file_name}")
|
||||
loader = loader_class(self.tmp_file_path)
|
||||
documents = [loader.load()]
|
||||
documents = []
|
||||
documents.extend(loader.load())
|
||||
|
||||
text_splitter = RecursiveCharacterTextSplitter.from_tiktoken_encoder(
|
||||
chunk_size=self.chunk_size, chunk_overlap=self.chunk_overlap
|
||||
|
Loading…
Reference in New Issue
Block a user