The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
Support to create shards_num in milvus vectorstores (#20318)
Rohit Gupta25c4c24e896b
diff --git a/libs/community/langchain_community/vectorstores/milvus.py b/libs/community/langchain_community/vectorstores/milvus.pyindex f1d3e0d929..1e14ad246c 100644--- a/libs/community/langchain_community/vectorstores/milvus.py+++ b/libs/community/langchain_community/vectorstores/milvus.py@@ -133,6 +133,7 @@ class Milvus(VectorStore):partition_names: Optional[list] = None,replica_number: int = 1,timeout: Optional[float] = None,+ num_shards: Optional[int] = None,):"""Initialize the Milvus vector store."""try:@@ -191,6 +192,7 @@ class Milvus(VectorStore):self.partition_names = partition_namesself.replica_number = replica_numberself.timeout = timeout+ self.num_shards = num_shards# Create the connection to the serverif connection_args is None:@@ -381,6 +383,7 @@ class Milvus(VectorStore):schema=schema,consistency_level=self.consistency_level,using=self.alias,+ num_shards=self.num_shards,)# Set the collection properties if they existif self.collection_properties is not None: