diff --git a/dbgpt/storage/vector_store/chroma_store.py b/dbgpt/storage/vector_store/chroma_store.py index 8587ff732..9149e3665 100644 --- a/dbgpt/storage/vector_store/chroma_store.py +++ b/dbgpt/storage/vector_store/chroma_store.py @@ -113,8 +113,10 @@ def delete_vector_name(self, vector_name): def delete_by_ids(self, ids): logger.info(f"begin delete chroma ids...") - collection = self.vector_store_client._collection - collection.delete(ids=ids) + ids = ids.split(",") + if len(ids) > 0: + collection = self.vector_store_client._collection + collection.delete(ids=ids) def _clean_persist_folder(self): for root, dirs, files in os.walk(self.persist_dir, topdown=False):