quivr/backend/parsers/epub.py

10 lines
400 B
Python
Raw Normal View History

2023-05-21 09:15:31 +03:00
from fastapi import UploadFile
from langchain.document_loaders.epub import UnstructuredEPubLoader
2023-06-19 23:46:25 +03:00
from models.settings import CommonsDep
from .common import process_file
2023-05-21 09:15:31 +03:00
def process_epub(commons: CommonsDep, file: UploadFile, enable_summarization, user, user_openai_api_key):
return process_file(commons, file, UnstructuredEPubLoader, ".epub", enable_summarization, user, user_openai_api_key)