Skip to main content
The MilvusHandshake class provides seamless integration between Chonkie’s chunking system and Milvus, a powerful, open-source vector database. Embed and store your Chonkie chunks in a Milvus collection, with automatic schema and index creation, without ever leaving the Chonkie SDK.

Installation

Before using the Milvus handshake, make sure to install the required dependencies:

Basic Usage

Initialization

Parameters

Union[str, Literal['random']]
default:"random"
The name of the Milvus collection to use. If ā€œrandomā€, a unique name is generated.
Union[str, BaseEmbeddings]
default:"minishlab/potion-retrieval-32M"
The embedding model to use for creating vectors.
Optional[str]
default:"None"
The full URI to connect to Milvus. This is the preferred method for specifying connection details.
str
default:"localhost"
The host of the Milvus instance. Used if uri is not provided.
str
default:"19530"
The port of the Milvus instance. Used if uri is not provided.
str
default:"default"
The connection alias to use for this Milvus connection.

Writing Chunks to Milvus

Searching Chunks in Milvus

You can retrieve the most similar chunks from your Milvus collection using the search method.