Skip to content

Commit

Permalink
Feature/add poppler check and fallback (#1529)
Browse files Browse the repository at this point in the history
* fix actions

* fallback
  • Loading branch information
emrgnt-cmplxty authored Oct 30, 2024
1 parent ed6b07d commit 977edf0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion py/core/providers/ingestion/r2r/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,13 @@ def check_vlm(model_name: str) -> bool:
or self.config.vision_pdf_model
)

if document.document_type == DocumentType.PDF and is_not_vlm:
has_not_poppler = not bool(
shutil.which("pdftoppm")
) # Check if poppler is installed

if document.document_type == DocumentType.PDF and (
is_not_vlm or has_not_poppler
):
logger.info(
f"Reverting to basic PDF parser as the provided is not a proper VLM model."
)
Expand Down

0 comments on commit 977edf0

Please sign in to comment.