fix: Fix the mypy check error (#1373)

Co-authored-by: yyhhyy <95077259+Hui824@users.noreply.github.com>
Co-authored-by: aries_ckt <916701291@qq.com>
Co-authored-by: Fangyin Cheng <staneyffer@gmail.com>
This commit is contained in:
yyhhyy
2024-04-07 14:22:23 +08:00
committed by GitHub
parent 62f90c95ce
commit f2a6284c0e
3 changed files with 13 additions and 2 deletions

View File

@@ -174,7 +174,10 @@ class MilvusStore(VectorStoreBase):
bytes_str = self.collection_name.encode("utf-8")
hex_str = bytes_str.hex()
self.collection_name = hex_str
if vector_store_config.embedding_fn is None:
# Perform runtime checks on self.embedding to
# ensure it has been correctly set and loaded
raise ValueError("embedding_fn is required for MilvusStore")
self.embedding: Embeddings = vector_store_config.embedding_fn
self.fields: List = []
self.alias = milvus_vector_config.get("alias") or "default"