Sfoglia il codice sorgente

fix weaviate delete_by_ids (#2565)

tags/0.5.7
Bowen Liang 1 anno fa
parent
commit
562ca45e07
Nessun account collegato all'indirizzo email del committer
1 ha cambiato i file con 5 aggiunte e 4 eliminazioni
  1. 5
    4
      api/core/rag/datasource/vdb/weaviate/weaviate_vector.py

+ 5
- 4
api/core/rag/datasource/vdb/weaviate/weaviate_vector.py Vedi File

@@ -150,10 +150,11 @@ class WeaviateVector(BaseVector):
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."""

Loading…
Annulla
Salva