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
c91a5d8b
"git@developer.sourcefind.cn:yaoyuping/nndetection.git" did not exist on "2a80e77d5adc82954a61243e7fba9aafea436b33"
Commit
c91a5d8b
authored
Mar 25, 2024
by
Doug Danat
Browse files
switch to using BeautifulSoup HTML loader so title is also captured
parent
77f4ffdd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
backend/apps/rag/main.py
backend/apps/rag/main.py
+2
-2
No files found.
backend/apps/rag/main.py
View file @
c91a5d8b
...
@@ -21,7 +21,7 @@ from langchain_community.document_loaders import (
...
@@ -21,7 +21,7 @@ from langchain_community.document_loaders import (
TextLoader
,
TextLoader
,
PyPDFLoader
,
PyPDFLoader
,
CSVLoader
,
CSVLoader
,
Unstructured
HTMLLoader
,
BS
HTMLLoader
,
Docx2txtLoader
,
Docx2txtLoader
,
UnstructuredEPubLoader
,
UnstructuredEPubLoader
,
UnstructuredWordDocumentLoader
,
UnstructuredWordDocumentLoader
,
...
@@ -404,7 +404,7 @@ def get_loader(filename: str, file_content_type: str, file_path: str):
...
@@ -404,7 +404,7 @@ def get_loader(filename: str, file_content_type: str, file_path: str):
elif
file_ext
==
"xml"
:
elif
file_ext
==
"xml"
:
loader
=
UnstructuredXMLLoader
(
file_path
)
loader
=
UnstructuredXMLLoader
(
file_path
)
elif
file_ext
in
[
"htm"
,
"html"
]:
elif
file_ext
in
[
"htm"
,
"html"
]:
loader
=
Unstructured
HTMLLoader
(
file_path
)
loader
=
BS
HTMLLoader
(
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