Syntax
api.createKnowledgeChunk(params)
Description
Creates a Knowledge Chunks in a Knowledge Source. A Knowledge Chunk is a discrete piece of knowledge containing text and optional Chunk metadata that can be searched and retrieved during AI Agent interactions. Parameters:params:CreateKnowledgeChunkParams— configuration object for the Knowledge Chunk. The object contains the following parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
knowledgeSourceId | String | Yes | The ID of the Knowledge Source. |
text | String | Yes | The content of the Knowledge Chunk. |
data | Object | No | Metadata for the chunk. An object where keys are strings and values can be strings, numbers, or booleans. |
Promise<{}> — a promise that resolves to an empty object when the Knowledge Chunk is created.