quivr/backend/parsers/pdf.py
Zineb El Bachiri e53bc6807d
Feat/multiple brains backend (#340)
* 🗃️ add new tables for multiple brains

* 🗑️ remove date input from fetch_user_id_from_credentials

*  new /brain endpoints

* ♻️ refactor backend utils by splitting it into files

* 💡 comments for next actions to update /upload
2023-06-16 23:36:53 +02:00

11 lines
373 B
Python

from fastapi import UploadFile
from langchain.document_loaders import PyMuPDFLoader
from utils.common import CommonsDep
from .common import process_file
def process_pdf(commons: CommonsDep, file: UploadFile, enable_summarization, user, user_openai_api_key):
return process_file(commons, file, PyMuPDFLoader, ".pdf", enable_summarization, user, user_openai_api_key)