from haystack.preview.components.file_converters.pypdf import PyPDFToDocuments not able to be recognised

87 Views Asked by At

While using haystack-ai v2.0 tried to import PyPDFToDocument function using preview package, but it was getting unrecognised by the compiler.

tried to upgrade the library, find the new package but still it was being un-recognised

1

There are 1 best solutions below

1
Kaustubh Ratna On

I resolved the issue they removed the preview package so instead of doing

from haystack.preview.components.file_converters.pypdf import PyPDFToDocuments

do:

from haystack.components.converters.pypdf import PyPDFToDocument