LanceDBHandshake class provides seamless integration between Chonkie’s chunking system and LanceDB, a serverless vector database built on Apache Arrow.
Embed and store your Chonkie chunks in LanceDB — locally or in the cloud — without ever leaving the Chonkie SDK.
Installation
Before using the LanceDB handshake, make sure to install the required dependencies:Basic Usage
Initialization
Writing Chunks to LanceDB
Searching Chunks in LanceDB
You can retrieve the most similar chunks from your LanceDB table using thesearch method:
Parameters
An existing LanceDB connection. If not provided, a new connection is created using
uri.URI of the LanceDB database. Use
"memory://" for an ephemeral in-memory database, a local directory path for persistent storage, or a db:// URI for LanceDB Cloud.Name of the table to write chunks to. If
"random", a unique name is auto-generated.Embedding model to use. Can be a model name string or a
BaseEmbeddings instance.