@aws-sdk/client-bedrock-agent 3.702.0 → 3.703.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -0
- package/dist-cjs/index.js +422 -22
- package/dist-es/BedrockAgent.js +8 -0
- package/dist-es/commands/DeleteKnowledgeBaseDocumentsCommand.js +22 -0
- package/dist-es/commands/GetKnowledgeBaseDocumentsCommand.js +22 -0
- package/dist-es/commands/IngestKnowledgeBaseDocumentsCommand.js +23 -0
- package/dist-es/commands/ListKnowledgeBaseDocumentsCommand.js +22 -0
- package/dist-es/commands/index.js +4 -0
- package/dist-es/models/models_0.js +80 -18
- package/dist-es/models/models_1.js +22 -0
- package/dist-es/pagination/ListKnowledgeBaseDocumentsPaginator.js +4 -0
- package/dist-es/pagination/index.js +1 -0
- package/dist-es/protocols/Aws_restJson1.js +208 -0
- package/dist-types/BedrockAgent.d.ts +28 -0
- package/dist-types/BedrockAgentClient.d.ts +6 -2
- package/dist-types/commands/AssociateAgentKnowledgeBaseCommand.d.ts +1 -1
- package/dist-types/commands/CreateDataSourceCommand.d.ts +3 -3
- package/dist-types/commands/CreateKnowledgeBaseCommand.d.ts +1 -1
- package/dist-types/commands/DeleteKnowledgeBaseCommand.d.ts +1 -1
- package/dist-types/commands/DeleteKnowledgeBaseDocumentsCommand.d.ts +119 -0
- package/dist-types/commands/DisassociateAgentKnowledgeBaseCommand.d.ts +1 -1
- package/dist-types/commands/GetDataSourceCommand.d.ts +1 -1
- package/dist-types/commands/GetKnowledgeBaseDocumentsCommand.d.ts +118 -0
- package/dist-types/commands/IngestKnowledgeBaseDocumentsCommand.d.ts +161 -0
- package/dist-types/commands/ListKnowledgeBaseDocumentsCommand.d.ts +110 -0
- package/dist-types/commands/UpdateDataSourceCommand.d.ts +2 -2
- package/dist-types/commands/index.d.ts +4 -0
- package/dist-types/models/models_0.d.ts +370 -351
- package/dist-types/models/models_1.d.ts +623 -1
- package/dist-types/pagination/ListKnowledgeBaseDocumentsPaginator.d.ts +7 -0
- package/dist-types/pagination/index.d.ts +1 -0
- package/dist-types/protocols/Aws_restJson1.d.ts +36 -0
- package/dist-types/ts3.4/BedrockAgent.d.ts +68 -0
- package/dist-types/ts3.4/BedrockAgentClient.d.ts +24 -0
- package/dist-types/ts3.4/commands/AssociateAgentKnowledgeBaseCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/CreateKnowledgeBaseCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/DeleteKnowledgeBaseCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/DeleteKnowledgeBaseDocumentsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/DisassociateAgentKnowledgeBaseCommand.d.ts +1 -1
- package/dist-types/ts3.4/commands/GetKnowledgeBaseDocumentsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/IngestKnowledgeBaseDocumentsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/ListKnowledgeBaseDocumentsCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +4 -0
- package/dist-types/ts3.4/models/models_0.d.ts +161 -147
- package/dist-types/ts3.4/models/models_1.d.ts +167 -4
- package/dist-types/ts3.4/pagination/ListKnowledgeBaseDocumentsPaginator.d.ts +11 -0
- package/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +48 -0
- package/package.json +1 -1
package/dist-es/BedrockAgent.js
CHANGED
|
@@ -20,6 +20,7 @@ import { DeleteFlowAliasCommand, } from "./commands/DeleteFlowAliasCommand";
|
|
|
20
20
|
import { DeleteFlowCommand } from "./commands/DeleteFlowCommand";
|
|
21
21
|
import { DeleteFlowVersionCommand, } from "./commands/DeleteFlowVersionCommand";
|
|
22
22
|
import { DeleteKnowledgeBaseCommand, } from "./commands/DeleteKnowledgeBaseCommand";
|
|
23
|
+
import { DeleteKnowledgeBaseDocumentsCommand, } from "./commands/DeleteKnowledgeBaseDocumentsCommand";
|
|
23
24
|
import { DeletePromptCommand, } from "./commands/DeletePromptCommand";
|
|
24
25
|
import { DisassociateAgentKnowledgeBaseCommand, } from "./commands/DisassociateAgentKnowledgeBaseCommand";
|
|
25
26
|
import { GetAgentActionGroupCommand, } from "./commands/GetAgentActionGroupCommand";
|
|
@@ -33,7 +34,9 @@ import { GetFlowCommand } from "./commands/GetFlowCommand";
|
|
|
33
34
|
import { GetFlowVersionCommand, } from "./commands/GetFlowVersionCommand";
|
|
34
35
|
import { GetIngestionJobCommand, } from "./commands/GetIngestionJobCommand";
|
|
35
36
|
import { GetKnowledgeBaseCommand, } from "./commands/GetKnowledgeBaseCommand";
|
|
37
|
+
import { GetKnowledgeBaseDocumentsCommand, } from "./commands/GetKnowledgeBaseDocumentsCommand";
|
|
36
38
|
import { GetPromptCommand } from "./commands/GetPromptCommand";
|
|
39
|
+
import { IngestKnowledgeBaseDocumentsCommand, } from "./commands/IngestKnowledgeBaseDocumentsCommand";
|
|
37
40
|
import { ListAgentActionGroupsCommand, } from "./commands/ListAgentActionGroupsCommand";
|
|
38
41
|
import { ListAgentAliasesCommand, } from "./commands/ListAgentAliasesCommand";
|
|
39
42
|
import { ListAgentKnowledgeBasesCommand, } from "./commands/ListAgentKnowledgeBasesCommand";
|
|
@@ -44,6 +47,7 @@ import { ListFlowAliasesCommand, } from "./commands/ListFlowAliasesCommand";
|
|
|
44
47
|
import { ListFlowsCommand } from "./commands/ListFlowsCommand";
|
|
45
48
|
import { ListFlowVersionsCommand, } from "./commands/ListFlowVersionsCommand";
|
|
46
49
|
import { ListIngestionJobsCommand, } from "./commands/ListIngestionJobsCommand";
|
|
50
|
+
import { ListKnowledgeBaseDocumentsCommand, } from "./commands/ListKnowledgeBaseDocumentsCommand";
|
|
47
51
|
import { ListKnowledgeBasesCommand, } from "./commands/ListKnowledgeBasesCommand";
|
|
48
52
|
import { ListPromptsCommand } from "./commands/ListPromptsCommand";
|
|
49
53
|
import { ListTagsForResourceCommand, } from "./commands/ListTagsForResourceCommand";
|
|
@@ -84,6 +88,7 @@ const commands = {
|
|
|
84
88
|
DeleteFlowAliasCommand,
|
|
85
89
|
DeleteFlowVersionCommand,
|
|
86
90
|
DeleteKnowledgeBaseCommand,
|
|
91
|
+
DeleteKnowledgeBaseDocumentsCommand,
|
|
87
92
|
DeletePromptCommand,
|
|
88
93
|
DisassociateAgentKnowledgeBaseCommand,
|
|
89
94
|
GetAgentCommand,
|
|
@@ -97,7 +102,9 @@ const commands = {
|
|
|
97
102
|
GetFlowVersionCommand,
|
|
98
103
|
GetIngestionJobCommand,
|
|
99
104
|
GetKnowledgeBaseCommand,
|
|
105
|
+
GetKnowledgeBaseDocumentsCommand,
|
|
100
106
|
GetPromptCommand,
|
|
107
|
+
IngestKnowledgeBaseDocumentsCommand,
|
|
101
108
|
ListAgentActionGroupsCommand,
|
|
102
109
|
ListAgentAliasesCommand,
|
|
103
110
|
ListAgentKnowledgeBasesCommand,
|
|
@@ -108,6 +115,7 @@ const commands = {
|
|
|
108
115
|
ListFlowsCommand,
|
|
109
116
|
ListFlowVersionsCommand,
|
|
110
117
|
ListIngestionJobsCommand,
|
|
118
|
+
ListKnowledgeBaseDocumentsCommand,
|
|
111
119
|
ListKnowledgeBasesCommand,
|
|
112
120
|
ListPromptsCommand,
|
|
113
121
|
ListTagsForResourceCommand,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
+
import { de_DeleteKnowledgeBaseDocumentsCommand, se_DeleteKnowledgeBaseDocumentsCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class DeleteKnowledgeBaseDocumentsCommand extends $Command
|
|
8
|
+
.classBuilder()
|
|
9
|
+
.ep(commonParams)
|
|
10
|
+
.m(function (Command, cs, config, o) {
|
|
11
|
+
return [
|
|
12
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
13
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
14
|
+
];
|
|
15
|
+
})
|
|
16
|
+
.s("AmazonBedrockAgentBuildTimeLambda", "DeleteKnowledgeBaseDocuments", {})
|
|
17
|
+
.n("BedrockAgentClient", "DeleteKnowledgeBaseDocumentsCommand")
|
|
18
|
+
.f(void 0, void 0)
|
|
19
|
+
.ser(se_DeleteKnowledgeBaseDocumentsCommand)
|
|
20
|
+
.de(de_DeleteKnowledgeBaseDocumentsCommand)
|
|
21
|
+
.build() {
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
+
import { de_GetKnowledgeBaseDocumentsCommand, se_GetKnowledgeBaseDocumentsCommand } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class GetKnowledgeBaseDocumentsCommand extends $Command
|
|
8
|
+
.classBuilder()
|
|
9
|
+
.ep(commonParams)
|
|
10
|
+
.m(function (Command, cs, config, o) {
|
|
11
|
+
return [
|
|
12
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
13
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
14
|
+
];
|
|
15
|
+
})
|
|
16
|
+
.s("AmazonBedrockAgentBuildTimeLambda", "GetKnowledgeBaseDocuments", {})
|
|
17
|
+
.n("BedrockAgentClient", "GetKnowledgeBaseDocumentsCommand")
|
|
18
|
+
.f(void 0, void 0)
|
|
19
|
+
.ser(se_GetKnowledgeBaseDocumentsCommand)
|
|
20
|
+
.de(de_GetKnowledgeBaseDocumentsCommand)
|
|
21
|
+
.build() {
|
|
22
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
+
import { IngestKnowledgeBaseDocumentsRequestFilterSensitiveLog, } from "../models/models_0";
|
|
6
|
+
import { de_IngestKnowledgeBaseDocumentsCommand, se_IngestKnowledgeBaseDocumentsCommand, } from "../protocols/Aws_restJson1";
|
|
7
|
+
export { $Command };
|
|
8
|
+
export class IngestKnowledgeBaseDocumentsCommand extends $Command
|
|
9
|
+
.classBuilder()
|
|
10
|
+
.ep(commonParams)
|
|
11
|
+
.m(function (Command, cs, config, o) {
|
|
12
|
+
return [
|
|
13
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
14
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
15
|
+
];
|
|
16
|
+
})
|
|
17
|
+
.s("AmazonBedrockAgentBuildTimeLambda", "IngestKnowledgeBaseDocuments", {})
|
|
18
|
+
.n("BedrockAgentClient", "IngestKnowledgeBaseDocumentsCommand")
|
|
19
|
+
.f(IngestKnowledgeBaseDocumentsRequestFilterSensitiveLog, void 0)
|
|
20
|
+
.ser(se_IngestKnowledgeBaseDocumentsCommand)
|
|
21
|
+
.de(de_IngestKnowledgeBaseDocumentsCommand)
|
|
22
|
+
.build() {
|
|
23
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { getEndpointPlugin } from "@smithy/middleware-endpoint";
|
|
2
|
+
import { getSerdePlugin } from "@smithy/middleware-serde";
|
|
3
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
4
|
+
import { commonParams } from "../endpoint/EndpointParameters";
|
|
5
|
+
import { de_ListKnowledgeBaseDocumentsCommand, se_ListKnowledgeBaseDocumentsCommand } from "../protocols/Aws_restJson1";
|
|
6
|
+
export { $Command };
|
|
7
|
+
export class ListKnowledgeBaseDocumentsCommand extends $Command
|
|
8
|
+
.classBuilder()
|
|
9
|
+
.ep(commonParams)
|
|
10
|
+
.m(function (Command, cs, config, o) {
|
|
11
|
+
return [
|
|
12
|
+
getSerdePlugin(config, this.serialize, this.deserialize),
|
|
13
|
+
getEndpointPlugin(config, Command.getEndpointParameterInstructions()),
|
|
14
|
+
];
|
|
15
|
+
})
|
|
16
|
+
.s("AmazonBedrockAgentBuildTimeLambda", "ListKnowledgeBaseDocuments", {})
|
|
17
|
+
.n("BedrockAgentClient", "ListKnowledgeBaseDocumentsCommand")
|
|
18
|
+
.f(void 0, void 0)
|
|
19
|
+
.ser(se_ListKnowledgeBaseDocumentsCommand)
|
|
20
|
+
.de(de_ListKnowledgeBaseDocumentsCommand)
|
|
21
|
+
.build() {
|
|
22
|
+
}
|
|
@@ -18,6 +18,7 @@ export * from "./DeleteFlowAliasCommand";
|
|
|
18
18
|
export * from "./DeleteFlowCommand";
|
|
19
19
|
export * from "./DeleteFlowVersionCommand";
|
|
20
20
|
export * from "./DeleteKnowledgeBaseCommand";
|
|
21
|
+
export * from "./DeleteKnowledgeBaseDocumentsCommand";
|
|
21
22
|
export * from "./DeletePromptCommand";
|
|
22
23
|
export * from "./DisassociateAgentKnowledgeBaseCommand";
|
|
23
24
|
export * from "./GetAgentActionGroupCommand";
|
|
@@ -31,7 +32,9 @@ export * from "./GetFlowCommand";
|
|
|
31
32
|
export * from "./GetFlowVersionCommand";
|
|
32
33
|
export * from "./GetIngestionJobCommand";
|
|
33
34
|
export * from "./GetKnowledgeBaseCommand";
|
|
35
|
+
export * from "./GetKnowledgeBaseDocumentsCommand";
|
|
34
36
|
export * from "./GetPromptCommand";
|
|
37
|
+
export * from "./IngestKnowledgeBaseDocumentsCommand";
|
|
35
38
|
export * from "./ListAgentActionGroupsCommand";
|
|
36
39
|
export * from "./ListAgentAliasesCommand";
|
|
37
40
|
export * from "./ListAgentKnowledgeBasesCommand";
|
|
@@ -42,6 +45,7 @@ export * from "./ListFlowAliasesCommand";
|
|
|
42
45
|
export * from "./ListFlowVersionsCommand";
|
|
43
46
|
export * from "./ListFlowsCommand";
|
|
44
47
|
export * from "./ListIngestionJobsCommand";
|
|
48
|
+
export * from "./ListKnowledgeBaseDocumentsCommand";
|
|
45
49
|
export * from "./ListKnowledgeBasesCommand";
|
|
46
50
|
export * from "./ListPromptsCommand";
|
|
47
51
|
export * from "./ListTagsForResourceCommand";
|
|
@@ -210,6 +210,7 @@ export const SharePointHostType = {
|
|
|
210
210
|
};
|
|
211
211
|
export const DataSourceType = {
|
|
212
212
|
CONFLUENCE: "CONFLUENCE",
|
|
213
|
+
CUSTOM: "CUSTOM",
|
|
213
214
|
S3: "S3",
|
|
214
215
|
SALESFORCE: "SALESFORCE",
|
|
215
216
|
SHAREPOINT: "SHAREPOINT",
|
|
@@ -512,27 +513,41 @@ export const SortOrder = {
|
|
|
512
513
|
ASCENDING: "ASCENDING",
|
|
513
514
|
DESCENDING: "DESCENDING",
|
|
514
515
|
};
|
|
515
|
-
export const
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
export const EmbeddingDataType = {
|
|
519
|
-
BINARY: "BINARY",
|
|
520
|
-
FLOAT32: "FLOAT32",
|
|
521
|
-
};
|
|
522
|
-
export const KnowledgeBaseStorageType = {
|
|
523
|
-
MONGO_DB_ATLAS: "MONGO_DB_ATLAS",
|
|
524
|
-
OPENSEARCH_SERVERLESS: "OPENSEARCH_SERVERLESS",
|
|
525
|
-
PINECONE: "PINECONE",
|
|
526
|
-
RDS: "RDS",
|
|
527
|
-
REDIS_ENTERPRISE_CLOUD: "REDIS_ENTERPRISE_CLOUD",
|
|
516
|
+
export const ContentDataSourceType = {
|
|
517
|
+
CUSTOM: "CUSTOM",
|
|
518
|
+
S3: "S3",
|
|
528
519
|
};
|
|
529
|
-
export const
|
|
530
|
-
|
|
531
|
-
CREATING: "CREATING",
|
|
532
|
-
DELETE_UNSUCCESSFUL: "DELETE_UNSUCCESSFUL",
|
|
520
|
+
export const DocumentStatus = {
|
|
521
|
+
DELETE_IN_PROGRESS: "DELETE_IN_PROGRESS",
|
|
533
522
|
DELETING: "DELETING",
|
|
534
523
|
FAILED: "FAILED",
|
|
535
|
-
|
|
524
|
+
IGNORED: "IGNORED",
|
|
525
|
+
INDEXED: "INDEXED",
|
|
526
|
+
IN_PROGRESS: "IN_PROGRESS",
|
|
527
|
+
METADATA_PARTIALLY_INDEXED: "METADATA_PARTIALLY_INDEXED",
|
|
528
|
+
METADATA_UPDATE_FAILED: "METADATA_UPDATE_FAILED",
|
|
529
|
+
NOT_FOUND: "NOT_FOUND",
|
|
530
|
+
PARTIALLY_INDEXED: "PARTIALLY_INDEXED",
|
|
531
|
+
PENDING: "PENDING",
|
|
532
|
+
STARTING: "STARTING",
|
|
533
|
+
};
|
|
534
|
+
export const InlineContentType = {
|
|
535
|
+
BYTE: "BYTE",
|
|
536
|
+
TEXT: "TEXT",
|
|
537
|
+
};
|
|
538
|
+
export const CustomSourceType = {
|
|
539
|
+
IN_LINE: "IN_LINE",
|
|
540
|
+
S3_LOCATION: "S3_LOCATION",
|
|
541
|
+
};
|
|
542
|
+
export const MetadataValueType = {
|
|
543
|
+
BOOLEAN: "BOOLEAN",
|
|
544
|
+
NUMBER: "NUMBER",
|
|
545
|
+
STRING: "STRING",
|
|
546
|
+
STRING_LIST: "STRING_LIST",
|
|
547
|
+
};
|
|
548
|
+
export const MetadataSourceType = {
|
|
549
|
+
IN_LINE_ATTRIBUTE: "IN_LINE_ATTRIBUTE",
|
|
550
|
+
S3_LOCATION: "S3_LOCATION",
|
|
536
551
|
};
|
|
537
552
|
export const APISchemaFilterSensitiveLog = (obj) => {
|
|
538
553
|
if (obj.s3 !== undefined)
|
|
@@ -943,3 +958,50 @@ export const UpdateFlowResponseFilterSensitiveLog = (obj) => ({
|
|
|
943
958
|
...obj,
|
|
944
959
|
...(obj.definition && { definition: SENSITIVE_STRING }),
|
|
945
960
|
});
|
|
961
|
+
export const ByteContentDocFilterSensitiveLog = (obj) => ({
|
|
962
|
+
...obj,
|
|
963
|
+
...(obj.data && { data: SENSITIVE_STRING }),
|
|
964
|
+
});
|
|
965
|
+
export const TextContentDocFilterSensitiveLog = (obj) => ({
|
|
966
|
+
...obj,
|
|
967
|
+
...(obj.data && { data: SENSITIVE_STRING }),
|
|
968
|
+
});
|
|
969
|
+
export const InlineContentFilterSensitiveLog = (obj) => ({
|
|
970
|
+
...obj,
|
|
971
|
+
...(obj.byteContent && { byteContent: ByteContentDocFilterSensitiveLog(obj.byteContent) }),
|
|
972
|
+
...(obj.textContent && { textContent: TextContentDocFilterSensitiveLog(obj.textContent) }),
|
|
973
|
+
});
|
|
974
|
+
export const CustomContentFilterSensitiveLog = (obj) => ({
|
|
975
|
+
...obj,
|
|
976
|
+
...(obj.inlineContent && { inlineContent: InlineContentFilterSensitiveLog(obj.inlineContent) }),
|
|
977
|
+
});
|
|
978
|
+
export const DocumentContentFilterSensitiveLog = (obj) => ({
|
|
979
|
+
...obj,
|
|
980
|
+
...(obj.custom && { custom: CustomContentFilterSensitiveLog(obj.custom) }),
|
|
981
|
+
});
|
|
982
|
+
export const MetadataAttributeValueFilterSensitiveLog = (obj) => ({
|
|
983
|
+
...obj,
|
|
984
|
+
...(obj.numberValue && { numberValue: SENSITIVE_STRING }),
|
|
985
|
+
...(obj.stringValue && { stringValue: SENSITIVE_STRING }),
|
|
986
|
+
...(obj.stringListValue && { stringListValue: SENSITIVE_STRING }),
|
|
987
|
+
});
|
|
988
|
+
export const MetadataAttributeFilterSensitiveLog = (obj) => ({
|
|
989
|
+
...obj,
|
|
990
|
+
...(obj.key && { key: SENSITIVE_STRING }),
|
|
991
|
+
...(obj.value && { value: MetadataAttributeValueFilterSensitiveLog(obj.value) }),
|
|
992
|
+
});
|
|
993
|
+
export const DocumentMetadataFilterSensitiveLog = (obj) => ({
|
|
994
|
+
...obj,
|
|
995
|
+
...(obj.inlineAttributes && {
|
|
996
|
+
inlineAttributes: obj.inlineAttributes.map((item) => MetadataAttributeFilterSensitiveLog(item)),
|
|
997
|
+
}),
|
|
998
|
+
});
|
|
999
|
+
export const KnowledgeBaseDocumentFilterSensitiveLog = (obj) => ({
|
|
1000
|
+
...obj,
|
|
1001
|
+
...(obj.metadata && { metadata: DocumentMetadataFilterSensitiveLog(obj.metadata) }),
|
|
1002
|
+
...(obj.content && { content: DocumentContentFilterSensitiveLog(obj.content) }),
|
|
1003
|
+
});
|
|
1004
|
+
export const IngestKnowledgeBaseDocumentsRequestFilterSensitiveLog = (obj) => ({
|
|
1005
|
+
...obj,
|
|
1006
|
+
...(obj.documents && { documents: obj.documents.map((item) => KnowledgeBaseDocumentFilterSensitiveLog(item)) }),
|
|
1007
|
+
});
|
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
import { SENSITIVE_STRING } from "@smithy/smithy-client";
|
|
2
2
|
import { AgentVersionFilterSensitiveLog, FlowValidationFilterSensitiveLog, PromptTemplateConfigurationFilterSensitiveLog, } from "./models_0";
|
|
3
|
+
export const KnowledgeBaseType = {
|
|
4
|
+
VECTOR: "VECTOR",
|
|
5
|
+
};
|
|
6
|
+
export const EmbeddingDataType = {
|
|
7
|
+
BINARY: "BINARY",
|
|
8
|
+
FLOAT32: "FLOAT32",
|
|
9
|
+
};
|
|
10
|
+
export const KnowledgeBaseStorageType = {
|
|
11
|
+
MONGO_DB_ATLAS: "MONGO_DB_ATLAS",
|
|
12
|
+
OPENSEARCH_SERVERLESS: "OPENSEARCH_SERVERLESS",
|
|
13
|
+
PINECONE: "PINECONE",
|
|
14
|
+
RDS: "RDS",
|
|
15
|
+
REDIS_ENTERPRISE_CLOUD: "REDIS_ENTERPRISE_CLOUD",
|
|
16
|
+
};
|
|
17
|
+
export const KnowledgeBaseStatus = {
|
|
18
|
+
ACTIVE: "ACTIVE",
|
|
19
|
+
CREATING: "CREATING",
|
|
20
|
+
DELETE_UNSUCCESSFUL: "DELETE_UNSUCCESSFUL",
|
|
21
|
+
DELETING: "DELETING",
|
|
22
|
+
FAILED: "FAILED",
|
|
23
|
+
UPDATING: "UPDATING",
|
|
24
|
+
};
|
|
3
25
|
export var PromptGenAiResource;
|
|
4
26
|
(function (PromptGenAiResource) {
|
|
5
27
|
PromptGenAiResource.visit = (value, visitor) => {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { createPaginator } from "@smithy/core";
|
|
2
|
+
import { BedrockAgentClient } from "../BedrockAgentClient";
|
|
3
|
+
import { ListKnowledgeBaseDocumentsCommand, } from "../commands/ListKnowledgeBaseDocumentsCommand";
|
|
4
|
+
export const paginateListKnowledgeBaseDocuments = createPaginator(BedrockAgentClient, ListKnowledgeBaseDocumentsCommand, "nextToken", "nextToken", "maxResults");
|
|
@@ -9,5 +9,6 @@ export * from "./ListFlowAliasesPaginator";
|
|
|
9
9
|
export * from "./ListFlowVersionsPaginator";
|
|
10
10
|
export * from "./ListFlowsPaginator";
|
|
11
11
|
export * from "./ListIngestionJobsPaginator";
|
|
12
|
+
export * from "./ListKnowledgeBaseDocumentsPaginator";
|
|
12
13
|
export * from "./ListKnowledgeBasesPaginator";
|
|
13
14
|
export * from "./ListPromptsPaginator";
|
|
@@ -316,6 +316,22 @@ export const se_DeleteKnowledgeBaseCommand = async (input, context) => {
|
|
|
316
316
|
b.m("DELETE").h(headers).b(body);
|
|
317
317
|
return b.build();
|
|
318
318
|
};
|
|
319
|
+
export const se_DeleteKnowledgeBaseDocumentsCommand = async (input, context) => {
|
|
320
|
+
const b = rb(input, context);
|
|
321
|
+
const headers = {
|
|
322
|
+
"content-type": "application/json",
|
|
323
|
+
};
|
|
324
|
+
b.bp("/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/documents/deleteDocuments");
|
|
325
|
+
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
326
|
+
b.p("dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
|
|
327
|
+
let body;
|
|
328
|
+
body = JSON.stringify(take(input, {
|
|
329
|
+
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
330
|
+
documentIdentifiers: (_) => _json(_),
|
|
331
|
+
}));
|
|
332
|
+
b.m("POST").h(headers).b(body);
|
|
333
|
+
return b.build();
|
|
334
|
+
};
|
|
319
335
|
export const se_DeletePromptCommand = async (input, context) => {
|
|
320
336
|
const b = rb(input, context);
|
|
321
337
|
const headers = {};
|
|
@@ -449,6 +465,21 @@ export const se_GetKnowledgeBaseCommand = async (input, context) => {
|
|
|
449
465
|
b.m("GET").h(headers).b(body);
|
|
450
466
|
return b.build();
|
|
451
467
|
};
|
|
468
|
+
export const se_GetKnowledgeBaseDocumentsCommand = async (input, context) => {
|
|
469
|
+
const b = rb(input, context);
|
|
470
|
+
const headers = {
|
|
471
|
+
"content-type": "application/json",
|
|
472
|
+
};
|
|
473
|
+
b.bp("/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/documents/getDocuments");
|
|
474
|
+
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
475
|
+
b.p("dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
|
|
476
|
+
let body;
|
|
477
|
+
body = JSON.stringify(take(input, {
|
|
478
|
+
documentIdentifiers: (_) => _json(_),
|
|
479
|
+
}));
|
|
480
|
+
b.m("POST").h(headers).b(body);
|
|
481
|
+
return b.build();
|
|
482
|
+
};
|
|
452
483
|
export const se_GetPromptCommand = async (input, context) => {
|
|
453
484
|
const b = rb(input, context);
|
|
454
485
|
const headers = {};
|
|
@@ -461,6 +492,22 @@ export const se_GetPromptCommand = async (input, context) => {
|
|
|
461
492
|
b.m("GET").h(headers).q(query).b(body);
|
|
462
493
|
return b.build();
|
|
463
494
|
};
|
|
495
|
+
export const se_IngestKnowledgeBaseDocumentsCommand = async (input, context) => {
|
|
496
|
+
const b = rb(input, context);
|
|
497
|
+
const headers = {
|
|
498
|
+
"content-type": "application/json",
|
|
499
|
+
};
|
|
500
|
+
b.bp("/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/documents");
|
|
501
|
+
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
502
|
+
b.p("dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
|
|
503
|
+
let body;
|
|
504
|
+
body = JSON.stringify(take(input, {
|
|
505
|
+
clientToken: [true, (_) => _ ?? generateIdempotencyToken()],
|
|
506
|
+
documents: (_) => se_KnowledgeBaseDocuments(_, context),
|
|
507
|
+
}));
|
|
508
|
+
b.m("PUT").h(headers).b(body);
|
|
509
|
+
return b.build();
|
|
510
|
+
};
|
|
464
511
|
export const se_ListAgentActionGroupsCommand = async (input, context) => {
|
|
465
512
|
const b = rb(input, context);
|
|
466
513
|
const headers = {
|
|
@@ -608,6 +655,22 @@ export const se_ListIngestionJobsCommand = async (input, context) => {
|
|
|
608
655
|
b.m("POST").h(headers).b(body);
|
|
609
656
|
return b.build();
|
|
610
657
|
};
|
|
658
|
+
export const se_ListKnowledgeBaseDocumentsCommand = async (input, context) => {
|
|
659
|
+
const b = rb(input, context);
|
|
660
|
+
const headers = {
|
|
661
|
+
"content-type": "application/json",
|
|
662
|
+
};
|
|
663
|
+
b.bp("/knowledgebases/{knowledgeBaseId}/datasources/{dataSourceId}/documents");
|
|
664
|
+
b.p("knowledgeBaseId", () => input.knowledgeBaseId, "{knowledgeBaseId}", false);
|
|
665
|
+
b.p("dataSourceId", () => input.dataSourceId, "{dataSourceId}", false);
|
|
666
|
+
let body;
|
|
667
|
+
body = JSON.stringify(take(input, {
|
|
668
|
+
maxResults: [],
|
|
669
|
+
nextToken: [],
|
|
670
|
+
}));
|
|
671
|
+
b.m("POST").h(headers).b(body);
|
|
672
|
+
return b.build();
|
|
673
|
+
};
|
|
611
674
|
export const se_ListKnowledgeBasesCommand = async (input, context) => {
|
|
612
675
|
const b = rb(input, context);
|
|
613
676
|
const headers = {
|
|
@@ -1230,6 +1293,20 @@ export const de_DeleteKnowledgeBaseCommand = async (output, context) => {
|
|
|
1230
1293
|
Object.assign(contents, doc);
|
|
1231
1294
|
return contents;
|
|
1232
1295
|
};
|
|
1296
|
+
export const de_DeleteKnowledgeBaseDocumentsCommand = async (output, context) => {
|
|
1297
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1298
|
+
return de_CommandError(output, context);
|
|
1299
|
+
}
|
|
1300
|
+
const contents = map({
|
|
1301
|
+
$metadata: deserializeMetadata(output),
|
|
1302
|
+
});
|
|
1303
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1304
|
+
const doc = take(data, {
|
|
1305
|
+
documentDetails: (_) => de_KnowledgeBaseDocumentDetails(_, context),
|
|
1306
|
+
});
|
|
1307
|
+
Object.assign(contents, doc);
|
|
1308
|
+
return contents;
|
|
1309
|
+
};
|
|
1233
1310
|
export const de_DeletePromptCommand = async (output, context) => {
|
|
1234
1311
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1235
1312
|
return de_CommandError(output, context);
|
|
@@ -1436,6 +1513,20 @@ export const de_GetKnowledgeBaseCommand = async (output, context) => {
|
|
|
1436
1513
|
Object.assign(contents, doc);
|
|
1437
1514
|
return contents;
|
|
1438
1515
|
};
|
|
1516
|
+
export const de_GetKnowledgeBaseDocumentsCommand = async (output, context) => {
|
|
1517
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1518
|
+
return de_CommandError(output, context);
|
|
1519
|
+
}
|
|
1520
|
+
const contents = map({
|
|
1521
|
+
$metadata: deserializeMetadata(output),
|
|
1522
|
+
});
|
|
1523
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1524
|
+
const doc = take(data, {
|
|
1525
|
+
documentDetails: (_) => de_KnowledgeBaseDocumentDetails(_, context),
|
|
1526
|
+
});
|
|
1527
|
+
Object.assign(contents, doc);
|
|
1528
|
+
return contents;
|
|
1529
|
+
};
|
|
1439
1530
|
export const de_GetPromptCommand = async (output, context) => {
|
|
1440
1531
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1441
1532
|
return de_CommandError(output, context);
|
|
@@ -1459,6 +1550,20 @@ export const de_GetPromptCommand = async (output, context) => {
|
|
|
1459
1550
|
Object.assign(contents, doc);
|
|
1460
1551
|
return contents;
|
|
1461
1552
|
};
|
|
1553
|
+
export const de_IngestKnowledgeBaseDocumentsCommand = async (output, context) => {
|
|
1554
|
+
if (output.statusCode !== 202 && output.statusCode >= 300) {
|
|
1555
|
+
return de_CommandError(output, context);
|
|
1556
|
+
}
|
|
1557
|
+
const contents = map({
|
|
1558
|
+
$metadata: deserializeMetadata(output),
|
|
1559
|
+
});
|
|
1560
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1561
|
+
const doc = take(data, {
|
|
1562
|
+
documentDetails: (_) => de_KnowledgeBaseDocumentDetails(_, context),
|
|
1563
|
+
});
|
|
1564
|
+
Object.assign(contents, doc);
|
|
1565
|
+
return contents;
|
|
1566
|
+
};
|
|
1462
1567
|
export const de_ListAgentActionGroupsCommand = async (output, context) => {
|
|
1463
1568
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1464
1569
|
return de_CommandError(output, context);
|
|
@@ -1609,6 +1714,21 @@ export const de_ListIngestionJobsCommand = async (output, context) => {
|
|
|
1609
1714
|
Object.assign(contents, doc);
|
|
1610
1715
|
return contents;
|
|
1611
1716
|
};
|
|
1717
|
+
export const de_ListKnowledgeBaseDocumentsCommand = async (output, context) => {
|
|
1718
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1719
|
+
return de_CommandError(output, context);
|
|
1720
|
+
}
|
|
1721
|
+
const contents = map({
|
|
1722
|
+
$metadata: deserializeMetadata(output),
|
|
1723
|
+
});
|
|
1724
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
1725
|
+
const doc = take(data, {
|
|
1726
|
+
documentDetails: (_) => de_KnowledgeBaseDocumentDetails(_, context),
|
|
1727
|
+
nextToken: __expectString,
|
|
1728
|
+
});
|
|
1729
|
+
Object.assign(contents, doc);
|
|
1730
|
+
return contents;
|
|
1731
|
+
};
|
|
1612
1732
|
export const de_ListKnowledgeBasesCommand = async (output, context) => {
|
|
1613
1733
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1614
1734
|
return de_CommandError(output, context);
|
|
@@ -2029,6 +2149,12 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
|
|
|
2029
2149
|
});
|
|
2030
2150
|
return __decorateServiceException(exception, parsedOutput.body);
|
|
2031
2151
|
};
|
|
2152
|
+
const se_ByteContentDoc = (input, context) => {
|
|
2153
|
+
return take(input, {
|
|
2154
|
+
data: context.base64Encoder,
|
|
2155
|
+
mimeType: [],
|
|
2156
|
+
});
|
|
2157
|
+
};
|
|
2032
2158
|
const se_ChatPromptTemplateConfiguration = (input, context) => {
|
|
2033
2159
|
return take(input, {
|
|
2034
2160
|
inputVariables: _json,
|
|
@@ -2037,6 +2163,28 @@ const se_ChatPromptTemplateConfiguration = (input, context) => {
|
|
|
2037
2163
|
toolConfiguration: (_) => se_ToolConfiguration(_, context),
|
|
2038
2164
|
});
|
|
2039
2165
|
};
|
|
2166
|
+
const se_CustomContent = (input, context) => {
|
|
2167
|
+
return take(input, {
|
|
2168
|
+
customDocumentIdentifier: _json,
|
|
2169
|
+
inlineContent: (_) => se_InlineContent(_, context),
|
|
2170
|
+
s3Location: _json,
|
|
2171
|
+
sourceType: [],
|
|
2172
|
+
});
|
|
2173
|
+
};
|
|
2174
|
+
const se_DocumentContent = (input, context) => {
|
|
2175
|
+
return take(input, {
|
|
2176
|
+
custom: (_) => se_CustomContent(_, context),
|
|
2177
|
+
dataSourceType: [],
|
|
2178
|
+
s3: _json,
|
|
2179
|
+
});
|
|
2180
|
+
};
|
|
2181
|
+
const se_DocumentMetadata = (input, context) => {
|
|
2182
|
+
return take(input, {
|
|
2183
|
+
inlineAttributes: (_) => se_MetadataAttributes(_, context),
|
|
2184
|
+
s3Location: _json,
|
|
2185
|
+
type: [],
|
|
2186
|
+
});
|
|
2187
|
+
};
|
|
2040
2188
|
const se_FlowDefinition = (input, context) => {
|
|
2041
2189
|
return take(input, {
|
|
2042
2190
|
connections: _json,
|
|
@@ -2085,6 +2233,48 @@ const se_InferenceConfiguration = (input, context) => {
|
|
|
2085
2233
|
topP: __serializeFloat,
|
|
2086
2234
|
});
|
|
2087
2235
|
};
|
|
2236
|
+
const se_InlineContent = (input, context) => {
|
|
2237
|
+
return take(input, {
|
|
2238
|
+
byteContent: (_) => se_ByteContentDoc(_, context),
|
|
2239
|
+
textContent: _json,
|
|
2240
|
+
type: [],
|
|
2241
|
+
});
|
|
2242
|
+
};
|
|
2243
|
+
const se_KnowledgeBaseDocument = (input, context) => {
|
|
2244
|
+
return take(input, {
|
|
2245
|
+
content: (_) => se_DocumentContent(_, context),
|
|
2246
|
+
metadata: (_) => se_DocumentMetadata(_, context),
|
|
2247
|
+
});
|
|
2248
|
+
};
|
|
2249
|
+
const se_KnowledgeBaseDocuments = (input, context) => {
|
|
2250
|
+
return input
|
|
2251
|
+
.filter((e) => e != null)
|
|
2252
|
+
.map((entry) => {
|
|
2253
|
+
return se_KnowledgeBaseDocument(entry, context);
|
|
2254
|
+
});
|
|
2255
|
+
};
|
|
2256
|
+
const se_MetadataAttribute = (input, context) => {
|
|
2257
|
+
return take(input, {
|
|
2258
|
+
key: [],
|
|
2259
|
+
value: (_) => se_MetadataAttributeValue(_, context),
|
|
2260
|
+
});
|
|
2261
|
+
};
|
|
2262
|
+
const se_MetadataAttributes = (input, context) => {
|
|
2263
|
+
return input
|
|
2264
|
+
.filter((e) => e != null)
|
|
2265
|
+
.map((entry) => {
|
|
2266
|
+
return se_MetadataAttribute(entry, context);
|
|
2267
|
+
});
|
|
2268
|
+
};
|
|
2269
|
+
const se_MetadataAttributeValue = (input, context) => {
|
|
2270
|
+
return take(input, {
|
|
2271
|
+
booleanValue: [],
|
|
2272
|
+
numberValue: __serializeFloat,
|
|
2273
|
+
stringListValue: _json,
|
|
2274
|
+
stringValue: [],
|
|
2275
|
+
type: [],
|
|
2276
|
+
});
|
|
2277
|
+
};
|
|
2088
2278
|
const se_PromptConfiguration = (input, context) => {
|
|
2089
2279
|
return take(input, {
|
|
2090
2280
|
basePromptTemplate: [],
|
|
@@ -2644,6 +2834,24 @@ const de_KnowledgeBase = (output, context) => {
|
|
|
2644
2834
|
updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
2645
2835
|
});
|
|
2646
2836
|
};
|
|
2837
|
+
const de_KnowledgeBaseDocumentDetail = (output, context) => {
|
|
2838
|
+
return take(output, {
|
|
2839
|
+
dataSourceId: __expectString,
|
|
2840
|
+
identifier: _json,
|
|
2841
|
+
knowledgeBaseId: __expectString,
|
|
2842
|
+
status: __expectString,
|
|
2843
|
+
statusReason: __expectString,
|
|
2844
|
+
updatedAt: (_) => __expectNonNull(__parseRfc3339DateTimeWithOffset(_)),
|
|
2845
|
+
});
|
|
2846
|
+
};
|
|
2847
|
+
const de_KnowledgeBaseDocumentDetails = (output, context) => {
|
|
2848
|
+
const retVal = (output || [])
|
|
2849
|
+
.filter((e) => e != null)
|
|
2850
|
+
.map((entry) => {
|
|
2851
|
+
return de_KnowledgeBaseDocumentDetail(entry, context);
|
|
2852
|
+
});
|
|
2853
|
+
return retVal;
|
|
2854
|
+
};
|
|
2647
2855
|
const de_KnowledgeBaseSummaries = (output, context) => {
|
|
2648
2856
|
const retVal = (output || [])
|
|
2649
2857
|
.filter((e) => e != null)
|