Turbopuffer Handshake
Export Chonkie’s Chunks into a Turbopuffer database.
The TurbopufferHandshake
class provides seamless integration between Chonkie’s chunking system and Turbopuffer, a high-performance vector database.
Embed and store your Chonkie chunks in Turbopuffer without ever leaving the Chonkie SDK.
The Turbopuffer Handshake requires a Turbopuffer API key. You can get one by signing up for a Turbopuffer account.
Installation
Before using the Turbopuffer handshake, make sure to install the required dependencies:
Basic Usage
Initialization
Writing Chunks to Turbopuffer
Parameters
An existing Turbopuffer Namespace instance to use. If not provided, a new namespace will be created.
Name of the namespace to use. If “random”, a unique name will be generated.
Only used if namespace
parameter is not provided.
Embedding model to use. Can be a model name or a BaseEmbeddings instance.
Turbopuffer API key. If not provided, will look for TURBOPUFFER_API_KEY environment variable.
Authentication
You can authenticate with Turbopuffer in one of two ways:
-
Environment Variable (Recommended for development):
-
Directly in code (Not recommended for production):
For production environments, it’s recommended to use environment variables or a secure secret management system to handle your API keys.