Skip to main content
The WeaviateHandshake class provides seamless integration between Chonkie’s chunking system and Weaviate, a powerful vector database. Embed and store your Chonkie chunks in Weaviate without ever leaving the Chonkie SDK.

Installation

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

Basic Usage

Initialization

Parameters

Optional[weaviate.Client]
default:"None"
Weaviate client instance. If not provided, a new client will be created based on other parameters.
Union[str, Literal['random']]
default:"random"
Name of the collection to use. If “random”, a unique name will be generated.
Union[str, BaseEmbeddings]
default:"minishlab/potion-retrieval-32M"
Embedding model to use. Can be a model name or a BaseEmbeddings instance.
Optional[str]
default:"None"
URL of the Weaviate server. If provided, will connect to this server.
Optional[str]
default:"None"
API key for Weaviate Cloud authentication.
Optional[dict[str, Any]]
default:"None"
OAuth configuration for authentication (optional).
int
default:"100"
Batch size for batch operations.
bool
default:"True"
Whether to use dynamic batching.
int
default:"3"
Number of retries for batch timeouts.
Optional[dict[str, str]]
default:"None"
Additional headers for the Weaviate client.

Writing Chunks to Weaviate

Searching Chunks in Weaviate

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