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
ffd0a5a2
"...git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "3edc547389a2e01dbef53aac3e78b6cb0bd299ae"
Commit
ffd0a5a2
authored
Jan 07, 2024
by
Timothy J. Baek
Browse files
Update main.py
parent
c68bb3b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
3 deletions
+1
-3
backend/apps/rag/main.py
backend/apps/rag/main.py
+1
-3
No files found.
backend/apps/rag/main.py
View file @
ffd0a5a2
...
@@ -64,9 +64,7 @@ def store_data_in_vector_db(data, collection_name) -> bool:
...
@@ -64,9 +64,7 @@ def store_data_in_vector_db(data, collection_name) -> bool:
metadatas
=
[
doc
.
metadata
for
doc
in
docs
]
metadatas
=
[
doc
.
metadata
for
doc
in
docs
]
try
:
try
:
collection
=
CHROMA_CLIENT
.
create_collection
(
collection
=
CHROMA_CLIENT
.
create_collection
(
name
=
collection_name
)
name
=
collection_name
,
embedding_function
=
EMBEDDING_FUNC
)
collection
.
add
(
collection
.
add
(
documents
=
texts
,
metadatas
=
metadatas
,
ids
=
[
str
(
uuid
.
uuid1
())
for
_
in
texts
]
documents
=
texts
,
metadatas
=
metadatas
,
ids
=
[
str
(
uuid
.
uuid1
())
for
_
in
texts
]
...
...
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