feat[Datasource]:add summary refresh (#1433)

Co-authored-by: hzh97 <2976151305@qq.com>
This commit is contained in:
Aries-ckt
2024-04-20 10:04:12 +08:00
committed by GitHub
parent 57be1ece18
commit b49b07f011
175 changed files with 61020 additions and 1494 deletions

View File

@@ -107,3 +107,18 @@ class DBSummaryClient:
else:
logger.info(f"Vector store name {vector_store_name} exist")
logger.info("initialize db summary profile success...")
def delete_db_profile(self, dbname):
"""Delete db profile."""
vector_store_name = dbname + "_profile"
from dbgpt.storage.vector_store.base import VectorStoreConfig
from dbgpt.storage.vector_store.connector import VectorStoreConnector
vector_store_config = VectorStoreConfig(name=vector_store_name)
vector_connector = VectorStoreConnector.from_default(
CFG.VECTOR_STORE_TYPE,
self.embeddings,
vector_store_config=vector_store_config,
)
vector_connector.delete_vector_name(vector_store_name)
logger.info(f"delete db profile {dbname} success")