Skip to main content

addDocuments

client.vectorDb.addDocuments(id: string, data: AddVectorDocumentsRequest): Promise<unknown>

Adds documents to a vector collection.

Ingests new documents into the collection, automatically generating embeddings and storing them for similarity search. Documents can include text content and metadata for filtering.

Parameters

ParameterTypeRequiredDescription
idstringYesThe unique identifier of the target collection
dataAddVectorDocumentsRequestYesThe documents to add along with their metadata

Returns

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

Example

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

const client = new CodeBoltClient();

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