mirror of
https://github.com/open-webui/open-webui
synced 2024-11-21 23:57:51 +00:00
refac
This commit is contained in:
parent
c0055afdb3
commit
4156b62811
@ -23,6 +23,7 @@ from open_webui.apps.retrieval.vector.connector import VECTOR_DB_CLIENT
|
||||
|
||||
# Document loaders
|
||||
from open_webui.apps.retrieval.loaders.main import Loader
|
||||
from open_webui.apps.retrieval.loaders.youtube import YoutubeLoader
|
||||
|
||||
# Web search engines
|
||||
from open_webui.apps.retrieval.web.main import SearchResult
|
||||
@ -120,9 +121,6 @@ from open_webui.utils.misc import (
|
||||
from open_webui.utils.utils import get_admin_user, get_verified_user
|
||||
|
||||
from langchain.text_splitter import RecursiveCharacterTextSplitter, TokenTextSplitter
|
||||
from langchain_community.document_loaders import (
|
||||
YoutubeLoader,
|
||||
)
|
||||
from langchain_core.documents import Document
|
||||
|
||||
|
||||
@ -1059,7 +1057,7 @@ def process_youtube_video(form_data: ProcessUrlForm, user=Depends(get_verified_u
|
||||
if not collection_name:
|
||||
collection_name = calculate_sha256_string(form_data.url)[:63]
|
||||
|
||||
loader = YoutubeLoader.from_youtube_url(
|
||||
loader = YoutubeLoader(
|
||||
form_data.url, language=app.state.config.YOUTUBE_LOADER_LANGUAGE
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user