fix: 🐛 parsers

pdf and odt to unstructured
This commit is contained in:
Stan Girard 2023-11-05 22:43:46 +01:00
parent 3bfea3bed7
commit ab11b384f7
2 changed files with 4 additions and 4 deletions

View File

@ -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,

View File

@ -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,