[Bug fix] reset() erases everything from db (#844)

This commit is contained in:
Sidharth Mohanty
2023-10-25 22:52:20 +05:30
committed by GitHub
parent 3ce2d8a656
commit bbce18caac
3 changed files with 242 additions and 307 deletions

View File

@@ -262,9 +262,9 @@ class ChromaDB(BaseVectorDB):
"""
Resets the database. Deletes all embeddings irreversibly.
"""
# Delete all data from the database
# Delete all data from the collection
try:
self.client.reset()
self.client.delete_collection(self.config.collection_name)
except ValueError:
raise ValueError(
"For safety reasons, resetting is disabled. "