This commit is contained in:
坐山客 2024-12-27 17:50:41 +08:00 committed by GitHub
parent 78c0368463
commit 6b4ccc8dfc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View File

@ -224,6 +224,7 @@ class VectorStoreConnector:
try:
if self.vector_name_exists():
self.client.delete_vector_name(vector_name)
del pools[self._vector_store_type][vector_name]
except Exception as e:
logger.error(f"delete vector name {vector_name} failed: {e}")
raise Exception(f"delete name {vector_name} failed")

View File

@ -4,6 +4,7 @@ import os
from typing import Any, Dict, Iterable, List, Mapping, Optional, Union
from chromadb import PersistentClient
from chromadb.api.client import SharedSystemClient
from chromadb.config import Settings
from dbgpt._private.pydantic import ConfigDict, Field
@ -201,6 +202,7 @@ class ChromaStore(VectorStoreBase):
logger.info(f"chroma vector_name:{vector_name} begin delete...")
# self.vector_store_client.delete_collection()
self._chroma_client.delete_collection(self._collection.name)
SharedSystemClient.clear_system_cache()
self._clean_persist_folder()
return True