IngestKnowledgeBaseDocuments
Source:
src/AWS/Bedrock/IngestKnowledgeBaseDocuments.ts
Runtime binding for bedrock-agent:IngestKnowledgeBaseDocuments — ingest
documents directly into the bound DataSource’s knowledge base
(inline text or S3 references) without running a full ingestion job.
The data source must be of type CUSTOM for inline content.
The binding grants the function bedrock:IngestKnowledgeBaseDocuments
scoped to the data source’s parent knowledge base.
Direct Document Ingestion
Section titled “Direct Document Ingestion”// initconst ingestDocuments = yield* Bedrock.IngestKnowledgeBaseDocuments(dataSource);
// runtimeconst { documentDetails } = yield* ingestDocuments({ documents: [ { content: { dataSourceType: "CUSTOM", custom: { customDocumentIdentifier: { id: "welcome-doc" }, sourceType: "IN_LINE", inlineContent: { type: "TEXT", textContent: { data: "Alchemy is an IaE framework." }, }, }, }, }, ],});