fix(chroma): wrap scalar vector_id in list for delete() (#5703)
This commit is contained in:
@@ -169,7 +169,7 @@ class ChromaDB(VectorStoreBase):
|
|||||||
Args:
|
Args:
|
||||||
vector_id (str): ID of the vector to delete.
|
vector_id (str): ID of the vector to delete.
|
||||||
"""
|
"""
|
||||||
self.collection.delete(ids=vector_id)
|
self.collection.delete(ids=[vector_id])
|
||||||
|
|
||||||
def update(
|
def update(
|
||||||
self,
|
self,
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ def test_delete_vector(chromadb_instance):
|
|||||||
|
|
||||||
chromadb_instance.delete(vector_id=vector_id)
|
chromadb_instance.delete(vector_id=vector_id)
|
||||||
|
|
||||||
chromadb_instance.collection.delete.assert_called_once_with(ids=vector_id)
|
chromadb_instance.collection.delete.assert_called_once_with(ids=[vector_id])
|
||||||
|
|
||||||
|
|
||||||
def test_update_vector(chromadb_instance):
|
def test_update_vector(chromadb_instance):
|
||||||
|
|||||||
Reference in New Issue
Block a user