2023-05-31 14:51:23 +03:00
|
|
|
from langchain.document_loaders import UnstructuredHTMLLoader
|
2023-06-28 20:39:27 +03:00
|
|
|
from models.files import File
|
2023-05-31 14:51:23 +03:00
|
|
|
|
|
|
|
from .common import process_file
|
2023-05-21 02:20:55 +03:00
|
|
|
|
|
|
|
|
2023-08-03 21:24:42 +03:00
|
|
|
def process_html(file: File, enable_summarization, brain_id, user_openai_api_key):
|
2023-08-03 17:20:36 +03:00
|
|
|
return process_file(
|
2023-08-03 21:24:42 +03:00
|
|
|
file=file,
|
|
|
|
loader_class=UnstructuredHTMLLoader,
|
|
|
|
enable_summarization=enable_summarization,
|
|
|
|
brain_id=brain_id,
|
|
|
|
user_openai_api_key=user_openai_api_key,
|
2023-08-03 17:20:36 +03:00
|
|
|
)
|