mirror of
https://github.com/StanGirard/quivr.git
synced 2024-12-20 09:42:12 +03:00
fdcdf581a8
* type common dependencies * delete unused code
31 lines
643 B
Python
31 lines
643 B
Python
import re
|
|
import unicodedata
|
|
|
|
import requests
|
|
from langchain.document_loaders import UnstructuredHTMLLoader
|
|
from models.files import File
|
|
from models.settings import CommonsDep
|
|
|
|
from .common import process_file
|
|
|
|
|
|
def process_html(
|
|
commons: CommonsDep, file: File, enable_summarization, brain_id, user_openai_api_key
|
|
):
|
|
return process_file(
|
|
commons,
|
|
file,
|
|
UnstructuredHTMLLoader,
|
|
enable_summarization,
|
|
brain_id,
|
|
user_openai_api_key,
|
|
)
|
|
|
|
|
|
def get_html(url):
|
|
response = requests.get(url)
|
|
if response.status_code == 200:
|
|
return response.text
|
|
else:
|
|
return None
|