quivr/backend/core/parsers/pdf.py

11 lines
369 B
Python
Raw Normal View History

from langchain.document_loaders import PyMuPDFLoader
2023-06-28 20:39:27 +03:00
from models.files import File
2023-06-19 23:46:25 +03:00
from models.settings import CommonsDep
from .common import process_file
2023-05-13 01:25:12 +03:00
2023-06-28 20:39:27 +03:00
def process_pdf(commons: CommonsDep, file: File, enable_summarization, brain_id, user_openai_api_key):
return process_file(commons, file, PyMuPDFLoader, enable_summarization, brain_id, user_openai_api_key)