Skip to main content

updateChunk

client.knowledge.updateChunk(chunkId: string, data: UpdateKnowledgeChunkRequest): Promise<unknown>

Updates a specific chunk's content or metadata.

Modifies an individual chunk within a document. Useful for correcting chunking artifacts or adding manual annotations.

Parameters

ParameterTypeRequiredDescription
chunkIdstringYesThe unique identifier of the chunk to update
dataUpdateKnowledgeChunkRequestYesThe fields to update on the chunk

Returns

Promise<unknown> — A promise that resolves when the chunk has been updated

Example

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

const client = new CodeBoltClient();

const result = await client.knowledge.updateChunk('chunkId', /* UpdateKnowledgeChunkRequest */);
console.log(result);