enh: PDF_LOADER_MODE

This commit is contained in:
Timothy Jaeryang Baek
2026-01-21 23:51:36 +04:00
parent 4615e8f92b
commit ecbdef732b
5 changed files with 43 additions and 1 deletions

View File

@@ -361,7 +361,9 @@ class Loader:
else:
if file_ext == "pdf":
loader = PyPDFLoader(
file_path, extract_images=self.kwargs.get("PDF_EXTRACT_IMAGES")
file_path,
extract_images=self.kwargs.get("PDF_EXTRACT_IMAGES"),
mode=self.kwargs.get("PDF_LOADER_MODE", "page"),
)
elif file_ext == "csv":
loader = CSVLoader(file_path, autodetect_encoding=True)