Update ingest.py

Co-authored-by: Bailey Matthews <bailey@hey.com>
This commit is contained in:
Ravi 2023-05-31 22:42:10 +05:30 committed by GitHub
parent db341e2a40
commit e9b31f7dd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -97,7 +97,7 @@ def load_documents(source_dir: str, ignored_files: List[str] = []) -> List[Docum
all_files = []
for ext in LOADER_MAPPING:
all_files.extend(
glob.glob(os.path.join(source_dir, f"**/*{ext}"), recursive=True)
glob.glob(os.path.join(source_dir, f"**/*{ext}"), recursive=True)
)
filtered_files = [file_path for file_path in all_files if file_path not in ignored_files]