Skip to content

Commit

Permalink
Fix Bug #2224 (#2240)
Browse files Browse the repository at this point in the history
  • Loading branch information
dusx1981 authored Dec 27, 2024
1 parent 78c0368 commit 6b4ccc8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions dbgpt/serve/rag/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ def delete_vector_name(self, vector_name: str):
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")
Expand Down
2 changes: 2 additions & 0 deletions dbgpt/storage/vector_store/chroma_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
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
Expand Down Expand Up @@ -201,6 +202,7 @@ def delete_vector_name(self, vector_name: str):
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

Expand Down

0 comments on commit 6b4ccc8

Please sign in to comment.