Reset function for VectorDBs (#2584)
This commit is contained in:
@@ -286,3 +286,9 @@ class PGVector(VectorStoreBase):
|
||||
self.cur.close()
|
||||
if hasattr(self, "conn"):
|
||||
self.conn.close()
|
||||
|
||||
def reset(self):
|
||||
"""Reset the index by deleting and recreating it."""
|
||||
logger.warning(f"Resetting index {self.collection_name}...")
|
||||
self.delete_col()
|
||||
self.create_col(self.embedding_model_dims)
|
||||
|
||||
Reference in New Issue
Block a user