`Milvus` vector store. You need to install `pymilvus` and run Milvus. See the following documentation for how to run a Milvus instance: https://milvus.io/docs/install_standalone-docker.md If looking for a hosted Milvus, take a look at this documentation: https://zilliz.com/clo
| 29 | alternative_import="langchain_milvus.MilvusVectorStore", |
| 30 | ) |
| 31 | class Milvus(VectorStore): |
| 32 | """`Milvus` vector store. |
| 33 | |
| 34 | You need to install `pymilvus` and run Milvus. |
| 35 | |
| 36 | See the following documentation for how to run a Milvus instance: |
| 37 | https://milvus.io/docs/install_standalone-docker.md |
| 38 | |
| 39 | If looking for a hosted Milvus, take a look at this documentation: |
| 40 | https://zilliz.com/cloud and make use of the Zilliz vectorstore found in |
| 41 | this project. |
| 42 | |
| 43 | IF USING L2/IP metric, IT IS HIGHLY SUGGESTED TO NORMALIZE YOUR DATA. |
| 44 | |
| 45 | Args: |
| 46 | embedding_function (Embeddings): Function used to embed the text. |
| 47 | collection_name (str): Which Milvus collection to use. Defaults to |
| 48 | "LangChainCollection". |
| 49 | collection_description (str): The description of the collection. Defaults to |
| 50 | "". |
| 51 | collection_properties (Optional[dict[str, any]]): The collection properties. |
| 52 | Defaults to None. |
| 53 | If set, will override collection existing properties. |
| 54 | For example: {"collection.ttl.seconds": 60}. |
| 55 | connection_args (Optional[dict[str, any]]): The connection args used for |
| 56 | this class comes in the form of a dict. |
| 57 | consistency_level (str): The consistency level to use for a collection. |
| 58 | Defaults to "Session". |
| 59 | index_params (Optional[dict]): Which index params to use. Defaults to |
| 60 | HNSW/AUTOINDEX depending on service. |
| 61 | search_params (Optional[dict]): Which search params to use. Defaults to |
| 62 | default of index. |
| 63 | drop_old (Optional[bool]): Whether to drop the current collection. Defaults |
| 64 | to False. |
| 65 | auto_id (bool): Whether to enable auto id for primary key. Defaults to False. |
| 66 | If False, you needs to provide text ids (string less than 65535 bytes). |
| 67 | If True, Milvus will generate unique integers as primary keys. |
| 68 | primary_field (str): Name of the primary key field. Defaults to "pk". |
| 69 | text_field (str): Name of the text field. Defaults to "text". |
| 70 | vector_field (str): Name of the vector field. Defaults to "vector". |
| 71 | metadata_field (str): Name of the metadata field. Defaults to None. |
| 72 | When metadata_field is specified, |
| 73 | the document's metadata will store as json. |
| 74 | |
| 75 | The connection args used for this class comes in the form of a dict, |
| 76 | here are a few of the options: |
| 77 | address (str): The actual address of Milvus |
| 78 | instance. Example address: "localhost:19530" |
| 79 | uri (str): The uri of Milvus instance. Example uri: |
| 80 | "http://randomwebsite:19530", |
| 81 | "tcp:foobarsite:19530", |
| 82 | "https://ok.s3.south.com:19530". |
| 83 | host (str): The host of Milvus instance. Default at "localhost", |
| 84 | PyMilvus will fill in the default host if only port is provided. |
| 85 | port (str/int): The port of Milvus instance. Default at 19530, PyMilvus |
| 86 | will fill in the default port if only host is provided. |
| 87 | user (str): Use which user to connect to Milvus instance. If user and |
| 88 | password are provided, we will add related header in every RPC call. |
no outgoing calls
no test coverage detected