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
a94e4161
Commit
a94e4161
authored
Feb 17, 2024
by
Timothy J. Baek
Browse files
fix: file content type issue
parent
79d0932a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
backend/apps/rag/main.py
backend/apps/rag/main.py
+3
-1
No files found.
backend/apps/rag/main.py
View file @
a94e4161
...
@@ -388,7 +388,9 @@ def scan_docs_dir(user=Depends(get_admin_user)):
...
@@ -388,7 +388,9 @@ def scan_docs_dir(user=Depends(get_admin_user)):
collection_name
=
calculate_sha256
(
f
)[:
63
]
collection_name
=
calculate_sha256
(
f
)[:
63
]
f
.
close
()
f
.
close
()
loader
,
known_type
=
get_loader
(
filename
,
file_content_type
,
str
(
path
))
loader
,
known_type
=
get_loader
(
filename
,
file_content_type
[
0
],
str
(
path
)
)
data
=
loader
.
load
()
data
=
loader
.
load
()
result
=
store_data_in_vector_db
(
data
,
collection_name
)
result
=
store_data_in_vector_db
(
data
,
collection_name
)
...
...
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