Skip to main content
The QdrantHandshake class provides seamless integration between Chonkie’s chunking system and Qdrant, a high-performance vector database. Embed and store your Chonkie chunks in Qdrant without ever leaving the Chonkie SDK.

Installation

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

Basic Usage

Initialization

Parameters

client
Optional[qdrant_client.QdrantClient]
default:"None"
Qdrant client instance. If not provided, a new client will be created based on other parameters.
collection_name
Union[str, Literal['random']]
default:"random"
Name of the collection to use. If “random”, a unique name will be generated.
embedding_model
Union[str, BaseEmbeddings]
default:"minishlab/potion-retrieval-32M"
Embedding model to use. Can be a model name or a BaseEmbeddings instance.
url
Optional[str]
default:"None"
URL of the Qdrant server. If provided, will connect to this server.
path
Optional[str]
default:"None"
If provided, creates a persistent Qdrant client at the specified path.
api_key
Optional[str]
default:"None"
API key for Qdrant Cloud authentication.

Writing Chunks to Qdrant

Searching Chunks in Qdrant

You can retrieve the most similar chunks from your Qdrant collection using the search method: