Skip to content

Commit

Permalink
fix weaviate delete_by_ids (langgenius#2565)
Browse files Browse the repository at this point in the history
  • Loading branch information
bowenliang123 authored Feb 27, 2024
1 parent 6bbd535 commit 562ca45
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions api/core/rag/datasource/vdb/weaviate/weaviate_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,11 @@ def text_exists(self, id: str) -> bool:
return True

def delete_by_ids(self, ids: list[str]) -> None:
self._client.data_object.delete(
ids,
class_name=self._collection_name
)
for uuid in ids:
self._client.data_object.delete(
class_name=self._collection_name,
uuid=uuid,
)

def search_by_vector(self, query_vector: list[float], **kwargs: Any) -> list[Document]:
"""Look up similar documents by embedding vector in Weaviate."""
Expand Down

0 comments on commit 562ca45

Please sign in to comment.