Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
open-webui
Commits
784a6ec8
Commit
784a6ec8
authored
Mar 25, 2024
by
Doug Danat
Browse files
include html langchain loader for RAG
parent
eb004ccf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
backend/apps/rag/main.py
backend/apps/rag/main.py
+3
-0
No files found.
backend/apps/rag/main.py
View file @
784a6ec8
...
@@ -21,6 +21,7 @@ from langchain_community.document_loaders import (
...
@@ -21,6 +21,7 @@ from langchain_community.document_loaders import (
TextLoader
,
TextLoader
,
PyPDFLoader
,
PyPDFLoader
,
CSVLoader
,
CSVLoader
,
UnstructuredHTMLLoader
,
Docx2txtLoader
,
Docx2txtLoader
,
UnstructuredEPubLoader
,
UnstructuredEPubLoader
,
UnstructuredWordDocumentLoader
,
UnstructuredWordDocumentLoader
,
...
@@ -402,6 +403,8 @@ def get_loader(filename: str, file_content_type: str, file_path: str):
...
@@ -402,6 +403,8 @@ def get_loader(filename: str, file_content_type: str, file_path: str):
loader
=
UnstructuredRSTLoader
(
file_path
,
mode
=
"elements"
)
loader
=
UnstructuredRSTLoader
(
file_path
,
mode
=
"elements"
)
elif
file_ext
==
"xml"
:
elif
file_ext
==
"xml"
:
loader
=
UnstructuredXMLLoader
(
file_path
)
loader
=
UnstructuredXMLLoader
(
file_path
)
elif
file_ext
in
[
"htm"
,
"html"
]:
loader
=
UnstructuredHTMLLoader
(
file_path
)
elif
file_ext
==
"md"
:
elif
file_ext
==
"md"
:
loader
=
UnstructuredMarkdownLoader
(
file_path
)
loader
=
UnstructuredMarkdownLoader
(
file_path
)
elif
file_content_type
==
"application/epub+zip"
:
elif
file_content_type
==
"application/epub+zip"
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment