community[patch]: speed up import times in the community package (#18928)

This PR speeds up import times in the community package
This commit is contained in:
Leonid Ganeline
2024-03-11 13:37:36 -07:00
committed by GitHub
parent a7fc731720
commit 11195cfa42
11 changed files with 430 additions and 668 deletions

View File

@@ -780,3 +780,7 @@ class DocumentIntelligenceLoader(BasePDFLoader):
"""Lazy load given path as pages."""
blob = Blob.from_path(self.file_path)
yield from self.parser.parse(blob)
# Legacy: only for backwards compatibility. Use PyPDFLoader instead
PagedPDFSplitter = PyPDFLoader