Skip to main content

addChunks

client.vectorDb.addChunks(id: string, data: AddVectorChunksRequest): Promise<unknown>

Adds chunks to a vector collection.

Manually adds pre-chunked text segments to the collection with their embeddings. This is useful when you have custom chunking logic or want to add chunks without full document processing.

Parameters​

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the target collection
dataAddVectorChunksRequestYesThe chunks to add with their embeddings and metadata

Returns​

Promise<unknown> — A promise that resolves when chunks have been added

Example​

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.vectorDb.addChunks('id', /* AddVectorChunksRequest */);
console.log(result);