@wildix/wim-knowledge-base-client > GetDocumentChunksCommand
GetDocumentChunksCommand class
Get the chunks of a document by its ID
Signature:
export declare class GetDocumentChunksCommand extends GetDocumentChunksCommand_base
Extends: GetDocumentChunksCommand_base
Example
Use a bare-bones client and the command you need to make an API call.
import { KnowledgeBaseClient, GetDocumentChunksCommand } from "@wildix/wim-knowledge-base-client"; // ES Modules import
// const { KnowledgeBaseClient, GetDocumentChunksCommand } = require("@wildix/wim-knowledge-base-client"); // CommonJS import
const client = new KnowledgeBaseClient(config);
const input = { // GetDocumentChunksInput
companyId: "STRING_VALUE",
dataSourceId: "STRING_VALUE", // required
documentId: "STRING_VALUE", // required
};
const command = new GetDocumentChunksCommand(input);
const response = await client.send(command);
// { // GetDocumentChunksOutput
// chunks: [ // ChunksList // required
// { // ChunkItem
// id: "STRING_VALUE", // required
// documentId: "STRING_VALUE", // required
// content: "STRING_VALUE", // required
// createdAt: "STRING_VALUE", // required
// updatedAt: "STRING_VALUE", // required
// },
// ],
// };