mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-05 10:29:36 +00:00
Update milvus_store.py
Reformatted the python script
This commit is contained in:
parent
61e5b7c03b
commit
bc80664eed
@ -730,7 +730,7 @@ class MilvusStore(VectorStoreBase):
|
|||||||
def truncate(self):
|
def truncate(self):
|
||||||
"""检测pymilvus安装"""
|
"""检测pymilvus安装"""
|
||||||
try:
|
try:
|
||||||
from pymilvus import Collection, utility
|
from pymilvus import Collection, utility
|
||||||
except ImportError:
|
except ImportError:
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"Could not import pymilvus python package. "
|
"Could not import pymilvus python package. "
|
||||||
@ -749,8 +749,9 @@ class MilvusStore(VectorStoreBase):
|
|||||||
collection.flush()
|
collection.flush()
|
||||||
logger.info(f"Truncate Milvus collection {self.collection_name} success")
|
logger.info(f"Truncate Milvus collection {self.collection_name} success")
|
||||||
else:
|
else:
|
||||||
logger.warning(f"Collection {self.collection_name} not found, skip truncate.")
|
logger.warning(
|
||||||
|
f"Collection {self.collection_name} not found, skip truncate."
|
||||||
|
)
|
||||||
|
|
||||||
def full_text_search(
|
def full_text_search(
|
||||||
self, text: str, topk: int = 10, filters: Optional[MetadataFilters] = None
|
self, text: str, topk: int = 10, filters: Optional[MetadataFilters] = None
|
||||||
|
Loading…
Reference in New Issue
Block a user