Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
f322d9bd
Unverified
Commit
f322d9bd
authored
Mar 04, 2024
by
waltcow
Committed by
GitHub
Mar 04, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix vdb merge error (#2650)
parent
05ce7b9d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
15 deletions
+24
-15
qdrant_vector.py
api/core/rag/datasource/vdb/qdrant/qdrant_vector.py
+23
-14
requirements.txt
api/requirements.txt
+1
-1
No files found.
api/core/rag/datasource/vdb/qdrant/qdrant_vector.py
View file @
f322d9bd
...
...
@@ -231,21 +231,30 @@ class QdrantVector(BaseVector):
def
delete
(
self
):
from
qdrant_client.http
import
models
filter
=
models
.
Filter
(
must
=
[
models
.
FieldCondition
(
key
=
"group_id"
,
match
=
models
.
MatchValue
(
value
=
self
.
_group_id
),
from
qdrant_client.http.exceptions
import
UnexpectedResponse
try
:
filter
=
models
.
Filter
(
must
=
[
models
.
FieldCondition
(
key
=
"group_id"
,
match
=
models
.
MatchValue
(
value
=
self
.
_group_id
),
),
],
)
self
.
_client
.
delete
(
collection_name
=
self
.
_collection_name
,
points_selector
=
FilterSelector
(
filter
=
filter
),
],
)
self
.
_client
.
delete
(
collection_name
=
self
.
_collection_name
,
points_selector
=
FilterSelector
(
filter
=
filter
),
)
)
except
UnexpectedResponse
as
e
:
# Collection does not exist, so return
if
e
.
status_code
==
404
:
return
# Some other error occurred, so re-raise the exception
else
:
raise
e
def
delete_by_ids
(
self
,
ids
:
list
[
str
])
->
None
:
from
qdrant_client.http
import
models
...
...
api/requirements.txt
View file @
f322d9bd
...
...
@@ -52,7 +52,7 @@ safetensors==0.3.2
zhipuai==1.0.7
werkzeug~=3.0.1
pymilvus==2.3.0
qdrant-client==1.
6.4
qdrant-client==1.
7.3
cohere~=4.44
pyyaml~=6.0.1
numpy~=1.25.2
...
...
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