diff --git a/backend/parsers/odt.py b/backend/parsers/odt.py index a80ac2f54..f26eccc24 100644 --- a/backend/parsers/odt.py +++ b/backend/parsers/odt.py @@ -1,4 +1,4 @@ -from langchain.document_loaders import PyMuPDFLoader +from langchain.document_loaders import UnstructuredPDFLoader from models import File from .common import process_file @@ -7,7 +7,7 @@ from .common import process_file def process_odt(file: File, enable_summarization, brain_id, user_openai_api_key): return process_file( file=file, - loader_class=PyMuPDFLoader, + loader_class=UnstructuredPDFLoader, enable_summarization=enable_summarization, brain_id=brain_id, user_openai_api_key=user_openai_api_key, diff --git a/backend/parsers/pdf.py b/backend/parsers/pdf.py index 18501a706..e44b0a37c 100644 --- a/backend/parsers/pdf.py +++ b/backend/parsers/pdf.py @@ -1,4 +1,4 @@ -from langchain.document_loaders import PyMuPDFLoader +from langchain.document_loaders import UnstructuredPDFLoader from models import File from .common import process_file @@ -7,7 +7,7 @@ from .common import process_file def process_pdf(file: File, enable_summarization, brain_id, user_openai_api_key): return process_file( file=file, - loader_class=PyMuPDFLoader, + loader_class=UnstructuredPDFLoader, enable_summarization=enable_summarization, brain_id=brain_id, user_openai_api_key=user_openai_api_key,