Set the uri and token for your Milvus server.
./milvus.db
, is the most convenient method, as it automatically utilizes Milvus Lite to store all data in this file.http://localhost:19530
. If you enable the authentication feature on Milvus, use your_username:your_password
as the token, otherwise don’t set the token.uri
and token
, which correspond to the Public Endpoint and API key in Zilliz Cloud.Milvus also supports asynchronous operations, enabling concurrency and leading to better performance.
Use aload()
and aprint_response()
methods with asyncio.run()
for non-blocking operations in high-throughput applications.
Parameter | Type | Description | Default |
---|---|---|---|
collection | str | Name of the Milvus collection | Required |
embedder | Optional[Embedder] | Embedder to use for embedding documents | OpenAIEmbedder() |
distance | Distance | Distance metric to use for vector similarity | Distance.cosine |
uri | str | URI of the Milvus server or path to local file | "http://localhost:19530" |
token | Optional[str] | Token for authentication with the Milvus server | None |
Advanced options can be passed as additional keyword arguments to the MilvusClient
constructor.
Set the uri and token for your Milvus server.
./milvus.db
, is the most convenient method, as it automatically utilizes Milvus Lite to store all data in this file.http://localhost:19530
. If you enable the authentication feature on Milvus, use your_username:your_password
as the token, otherwise don’t set the token.uri
and token
, which correspond to the Public Endpoint and API key in Zilliz Cloud.Milvus also supports asynchronous operations, enabling concurrency and leading to better performance.
Use aload()
and aprint_response()
methods with asyncio.run()
for non-blocking operations in high-throughput applications.
Parameter | Type | Description | Default |
---|---|---|---|
collection | str | Name of the Milvus collection | Required |
embedder | Optional[Embedder] | Embedder to use for embedding documents | OpenAIEmbedder() |
distance | Distance | Distance metric to use for vector similarity | Distance.cosine |
uri | str | URI of the Milvus server or path to local file | "http://localhost:19530" |
token | Optional[str] | Token for authentication with the Milvus server | None |
Advanced options can be passed as additional keyword arguments to the MilvusClient
constructor.