Skip to content

Commit

Permalink
fix(ChatKnowledge): delete Chroma by vector ids did not success (eosp…
Browse files Browse the repository at this point in the history
  • Loading branch information
Aries-ckt authored and penghou.ho committed Jan 18, 2024
1 parent d187e83 commit 08942f8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dbgpt/storage/vector_store/chroma_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 08942f8

Please sign in to comment.