Skip to content

Commit e631752

Browse files
author
awstools
committed
feat(client-bedrock-agent): Add support for the prompt caching feature for Bedrock Prompt Management
1 parent 3488ae9 commit e631752

21 files changed

+669
-152
lines changed

clients/client-bedrock-agent/src/commands/CreateAgentAliasCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export interface CreateAgentAliasCommandOutput extends CreateAgentAliasResponse,
8080
* // startDate: new Date("TIMESTAMP"),
8181
* // },
8282
* // ],
83-
* // agentAliasStatus: "CREATING" || "PREPARED" || "FAILED" || "UPDATING" || "DELETING", // required
83+
* // agentAliasStatus: "CREATING" || "PREPARED" || "FAILED" || "UPDATING" || "DELETING" || "DISSOCIATED", // required
8484
* // failureReasons: [ // FailureReasons
8585
* // "STRING_VALUE",
8686
* // ],

clients/client-bedrock-agent/src/commands/CreateFlowCommand.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ export interface CreateFlowCommandOutput extends CreateFlowResponse, __MetadataB
8383
* templateConfiguration: { // PromptTemplateConfiguration Union: only one key present
8484
* text: { // TextPromptTemplateConfiguration
8585
* text: "STRING_VALUE", // required
86+
* cachePoint: { // CachePointBlock
87+
* type: "default", // required
88+
* },
8689
* inputVariables: [ // PromptInputVariablesList
8790
* { // PromptInputVariable
8891
* name: "STRING_VALUE",
@@ -96,13 +99,17 @@ export interface CreateFlowCommandOutput extends CreateFlowResponse, __MetadataB
9699
* content: [ // ContentBlocks // required
97100
* { // ContentBlock Union: only one key present
98101
* text: "STRING_VALUE",
102+
* cachePoint: {
103+
* type: "default", // required
104+
* },
99105
* },
100106
* ],
101107
* },
102108
* ],
103109
* system: [ // SystemContentBlocks
104110
* { // SystemContentBlock Union: only one key present
105111
* text: "STRING_VALUE",
112+
* cachePoint: "<CachePointBlock>",
106113
* },
107114
* ],
108115
* inputVariables: [
@@ -120,6 +127,7 @@ export interface CreateFlowCommandOutput extends CreateFlowResponse, __MetadataB
120127
* json: "DOCUMENT_VALUE",
121128
* },
122129
* },
130+
* cachePoint: "<CachePointBlock>",
123131
* },
124132
* ],
125133
* toolChoice: { // ToolChoice Union: only one key present
@@ -263,6 +271,9 @@ export interface CreateFlowCommandOutput extends CreateFlowResponse, __MetadataB
263271
* // templateConfiguration: { // PromptTemplateConfiguration Union: only one key present
264272
* // text: { // TextPromptTemplateConfiguration
265273
* // text: "STRING_VALUE", // required
274+
* // cachePoint: { // CachePointBlock
275+
* // type: "default", // required
276+
* // },
266277
* // inputVariables: [ // PromptInputVariablesList
267278
* // { // PromptInputVariable
268279
* // name: "STRING_VALUE",
@@ -276,13 +287,17 @@ export interface CreateFlowCommandOutput extends CreateFlowResponse, __MetadataB
276287
* // content: [ // ContentBlocks // required
277288
* // { // ContentBlock Union: only one key present
278289
* // text: "STRING_VALUE",
290+
* // cachePoint: {
291+
* // type: "default", // required
292+
* // },
279293
* // },
280294
* // ],
281295
* // },
282296
* // ],
283297
* // system: [ // SystemContentBlocks
284298
* // { // SystemContentBlock Union: only one key present
285299
* // text: "STRING_VALUE",
300+
* // cachePoint: "<CachePointBlock>",
286301
* // },
287302
* // ],
288303
* // inputVariables: [
@@ -300,6 +315,7 @@ export interface CreateFlowCommandOutput extends CreateFlowResponse, __MetadataB
300315
* // json: "DOCUMENT_VALUE",
301316
* // },
302317
* // },
318+
* // cachePoint: "<CachePointBlock>",
303319
* // },
304320
* // ],
305321
* // toolChoice: { // ToolChoice Union: only one key present

clients/client-bedrock-agent/src/commands/CreateFlowVersionCommand.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ export interface CreateFlowVersionCommandOutput extends CreateFlowVersionRespons
9494
* // templateConfiguration: { // PromptTemplateConfiguration Union: only one key present
9595
* // text: { // TextPromptTemplateConfiguration
9696
* // text: "STRING_VALUE", // required
97+
* // cachePoint: { // CachePointBlock
98+
* // type: "default", // required
99+
* // },
97100
* // inputVariables: [ // PromptInputVariablesList
98101
* // { // PromptInputVariable
99102
* // name: "STRING_VALUE",
@@ -107,13 +110,17 @@ export interface CreateFlowVersionCommandOutput extends CreateFlowVersionRespons
107110
* // content: [ // ContentBlocks // required
108111
* // { // ContentBlock Union: only one key present
109112
* // text: "STRING_VALUE",
113+
* // cachePoint: {
114+
* // type: "default", // required
115+
* // },
110116
* // },
111117
* // ],
112118
* // },
113119
* // ],
114120
* // system: [ // SystemContentBlocks
115121
* // { // SystemContentBlock Union: only one key present
116122
* // text: "STRING_VALUE",
123+
* // cachePoint: "<CachePointBlock>",
117124
* // },
118125
* // ],
119126
* // inputVariables: [
@@ -131,6 +138,7 @@ export interface CreateFlowVersionCommandOutput extends CreateFlowVersionRespons
131138
* // json: "DOCUMENT_VALUE",
132139
* // },
133140
* // },
141+
* // cachePoint: "<CachePointBlock>",
134142
* // },
135143
* // ],
136144
* // toolChoice: { // ToolChoice Union: only one key present

clients/client-bedrock-agent/src/commands/CreatePromptCommand.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ export interface CreatePromptCommandOutput extends CreatePromptResponse, __Metad
5252
* templateConfiguration: { // PromptTemplateConfiguration Union: only one key present
5353
* text: { // TextPromptTemplateConfiguration
5454
* text: "STRING_VALUE", // required
55+
* cachePoint: { // CachePointBlock
56+
* type: "default", // required
57+
* },
5558
* inputVariables: [ // PromptInputVariablesList
5659
* { // PromptInputVariable
5760
* name: "STRING_VALUE",
@@ -65,13 +68,17 @@ export interface CreatePromptCommandOutput extends CreatePromptResponse, __Metad
6568
* content: [ // ContentBlocks // required
6669
* { // ContentBlock Union: only one key present
6770
* text: "STRING_VALUE",
71+
* cachePoint: {
72+
* type: "default", // required
73+
* },
6874
* },
6975
* ],
7076
* },
7177
* ],
7278
* system: [ // SystemContentBlocks
7379
* { // SystemContentBlock Union: only one key present
7480
* text: "STRING_VALUE",
81+
* cachePoint: "<CachePointBlock>",
7582
* },
7683
* ],
7784
* inputVariables: [
@@ -89,6 +96,7 @@ export interface CreatePromptCommandOutput extends CreatePromptResponse, __Metad
8996
* json: "DOCUMENT_VALUE",
9097
* },
9198
* },
99+
* cachePoint: "<CachePointBlock>",
92100
* },
93101
* ],
94102
* toolChoice: { // ToolChoice Union: only one key present
@@ -145,6 +153,9 @@ export interface CreatePromptCommandOutput extends CreatePromptResponse, __Metad
145153
* // templateConfiguration: { // PromptTemplateConfiguration Union: only one key present
146154
* // text: { // TextPromptTemplateConfiguration
147155
* // text: "STRING_VALUE", // required
156+
* // cachePoint: { // CachePointBlock
157+
* // type: "default", // required
158+
* // },
148159
* // inputVariables: [ // PromptInputVariablesList
149160
* // { // PromptInputVariable
150161
* // name: "STRING_VALUE",
@@ -158,13 +169,17 @@ export interface CreatePromptCommandOutput extends CreatePromptResponse, __Metad
158169
* // content: [ // ContentBlocks // required
159170
* // { // ContentBlock Union: only one key present
160171
* // text: "STRING_VALUE",
172+
* // cachePoint: {
173+
* // type: "default", // required
174+
* // },
161175
* // },
162176
* // ],
163177
* // },
164178
* // ],
165179
* // system: [ // SystemContentBlocks
166180
* // { // SystemContentBlock Union: only one key present
167181
* // text: "STRING_VALUE",
182+
* // cachePoint: "<CachePointBlock>",
168183
* // },
169184
* // ],
170185
* // inputVariables: [
@@ -182,6 +197,7 @@ export interface CreatePromptCommandOutput extends CreatePromptResponse, __Metad
182197
* // json: "DOCUMENT_VALUE",
183198
* // },
184199
* // },
200+
* // cachePoint: "<CachePointBlock>",
185201
* // },
186202
* // ],
187203
* // toolChoice: { // ToolChoice Union: only one key present

clients/client-bedrock-agent/src/commands/CreatePromptVersionCommand.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ export interface CreatePromptVersionCommandOutput extends CreatePromptVersionRes
6161
* // templateConfiguration: { // PromptTemplateConfiguration Union: only one key present
6262
* // text: { // TextPromptTemplateConfiguration
6363
* // text: "STRING_VALUE", // required
64+
* // cachePoint: { // CachePointBlock
65+
* // type: "default", // required
66+
* // },
6467
* // inputVariables: [ // PromptInputVariablesList
6568
* // { // PromptInputVariable
6669
* // name: "STRING_VALUE",
@@ -74,13 +77,17 @@ export interface CreatePromptVersionCommandOutput extends CreatePromptVersionRes
7477
* // content: [ // ContentBlocks // required
7578
* // { // ContentBlock Union: only one key present
7679
* // text: "STRING_VALUE",
80+
* // cachePoint: {
81+
* // type: "default", // required
82+
* // },
7783
* // },
7884
* // ],
7985
* // },
8086
* // ],
8187
* // system: [ // SystemContentBlocks
8288
* // { // SystemContentBlock Union: only one key present
8389
* // text: "STRING_VALUE",
90+
* // cachePoint: "<CachePointBlock>",
8491
* // },
8592
* // ],
8693
* // inputVariables: [
@@ -98,6 +105,7 @@ export interface CreatePromptVersionCommandOutput extends CreatePromptVersionRes
98105
* // json: "DOCUMENT_VALUE",
99106
* // },
100107
* // },
108+
* // cachePoint: "<CachePointBlock>",
101109
* // },
102110
* // ],
103111
* // toolChoice: { // ToolChoice Union: only one key present

clients/client-bedrock-agent/src/commands/DeleteAgentAliasCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export interface DeleteAgentAliasCommandOutput extends DeleteAgentAliasResponse,
4444
* // { // DeleteAgentAliasResponse
4545
* // agentId: "STRING_VALUE", // required
4646
* // agentAliasId: "STRING_VALUE", // required
47-
* // agentAliasStatus: "CREATING" || "PREPARED" || "FAILED" || "UPDATING" || "DELETING", // required
47+
* // agentAliasStatus: "CREATING" || "PREPARED" || "FAILED" || "UPDATING" || "DELETING" || "DISSOCIATED", // required
4848
* // };
4949
*
5050
* ```

clients/client-bedrock-agent/src/commands/DeleteKnowledgeBaseDocumentsCommand.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { BedrockAgentClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockAgentClient";
88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { DeleteKnowledgeBaseDocumentsRequest, DeleteKnowledgeBaseDocumentsResponse } from "../models/models_0";
9+
import { DeleteKnowledgeBaseDocumentsRequest } from "../models/models_0";
10+
import { DeleteKnowledgeBaseDocumentsResponse } from "../models/models_1";
1011
import {
1112
de_DeleteKnowledgeBaseDocumentsCommand,
1213
se_DeleteKnowledgeBaseDocumentsCommand,

clients/client-bedrock-agent/src/commands/GetAgentAliasCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export interface GetAgentAliasCommandOutput extends GetAgentAliasResponse, __Met
6969
* // startDate: new Date("TIMESTAMP"),
7070
* // },
7171
* // ],
72-
* // agentAliasStatus: "CREATING" || "PREPARED" || "FAILED" || "UPDATING" || "DELETING", // required
72+
* // agentAliasStatus: "CREATING" || "PREPARED" || "FAILED" || "UPDATING" || "DELETING" || "DISSOCIATED", // required
7373
* // failureReasons: [ // FailureReasons
7474
* // "STRING_VALUE",
7575
* // ],

clients/client-bedrock-agent/src/commands/GetFlowCommand.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ export interface GetFlowCommandOutput extends GetFlowResponse, __MetadataBearer
8989
* // templateConfiguration: { // PromptTemplateConfiguration Union: only one key present
9090
* // text: { // TextPromptTemplateConfiguration
9191
* // text: "STRING_VALUE", // required
92+
* // cachePoint: { // CachePointBlock
93+
* // type: "default", // required
94+
* // },
9295
* // inputVariables: [ // PromptInputVariablesList
9396
* // { // PromptInputVariable
9497
* // name: "STRING_VALUE",
@@ -102,13 +105,17 @@ export interface GetFlowCommandOutput extends GetFlowResponse, __MetadataBearer
102105
* // content: [ // ContentBlocks // required
103106
* // { // ContentBlock Union: only one key present
104107
* // text: "STRING_VALUE",
108+
* // cachePoint: {
109+
* // type: "default", // required
110+
* // },
105111
* // },
106112
* // ],
107113
* // },
108114
* // ],
109115
* // system: [ // SystemContentBlocks
110116
* // { // SystemContentBlock Union: only one key present
111117
* // text: "STRING_VALUE",
118+
* // cachePoint: "<CachePointBlock>",
112119
* // },
113120
* // ],
114121
* // inputVariables: [
@@ -126,6 +133,7 @@ export interface GetFlowCommandOutput extends GetFlowResponse, __MetadataBearer
126133
* // json: "DOCUMENT_VALUE",
127134
* // },
128135
* // },
136+
* // cachePoint: "<CachePointBlock>",
129137
* // },
130138
* // ],
131139
* // toolChoice: { // ToolChoice Union: only one key present
@@ -301,8 +309,16 @@ export interface GetFlowCommandOutput extends GetFlowResponse, __MetadataBearer
301309
* // connection: "STRING_VALUE", // required
302310
* // },
303311
* // unspecified: {},
312+
* // unknownNodeInput: { // UnknownNodeInputFlowValidationDetails
313+
* // node: "STRING_VALUE", // required
314+
* // input: "STRING_VALUE", // required
315+
* // },
316+
* // unknownNodeOutput: { // UnknownNodeOutputFlowValidationDetails
317+
* // node: "STRING_VALUE", // required
318+
* // output: "STRING_VALUE", // required
319+
* // },
304320
* // },
305-
* // type: "CyclicConnection" || "DuplicateConnections" || "DuplicateConditionExpression" || "UnreachableNode" || "UnknownConnectionSource" || "UnknownConnectionSourceOutput" || "UnknownConnectionTarget" || "UnknownConnectionTargetInput" || "UnknownConnectionCondition" || "MalformedConditionExpression" || "MalformedNodeInputExpression" || "MismatchedNodeInputType" || "MismatchedNodeOutputType" || "IncompatibleConnectionDataType" || "MissingConnectionConfiguration" || "MissingDefaultCondition" || "MissingEndingNodes" || "MissingNodeConfiguration" || "MissingNodeInput" || "MissingNodeOutput" || "MissingStartingNodes" || "MultipleNodeInputConnections" || "UnfulfilledNodeInput" || "UnsatisfiedConnectionConditions" || "Unspecified",
321+
* // type: "CyclicConnection" || "DuplicateConnections" || "DuplicateConditionExpression" || "UnreachableNode" || "UnknownConnectionSource" || "UnknownConnectionSourceOutput" || "UnknownConnectionTarget" || "UnknownConnectionTargetInput" || "UnknownConnectionCondition" || "MalformedConditionExpression" || "MalformedNodeInputExpression" || "MismatchedNodeInputType" || "MismatchedNodeOutputType" || "IncompatibleConnectionDataType" || "MissingConnectionConfiguration" || "MissingDefaultCondition" || "MissingEndingNodes" || "MissingNodeConfiguration" || "MissingNodeInput" || "MissingNodeOutput" || "MissingStartingNodes" || "MultipleNodeInputConnections" || "UnfulfilledNodeInput" || "UnsatisfiedConnectionConditions" || "Unspecified" || "UnknownNodeInput" || "UnknownNodeOutput",
306322
* // },
307323
* // ],
308324
* // };

clients/client-bedrock-agent/src/commands/GetFlowVersionCommand.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ export interface GetFlowVersionCommandOutput extends GetFlowVersionResponse, __M
9393
* // templateConfiguration: { // PromptTemplateConfiguration Union: only one key present
9494
* // text: { // TextPromptTemplateConfiguration
9595
* // text: "STRING_VALUE", // required
96+
* // cachePoint: { // CachePointBlock
97+
* // type: "default", // required
98+
* // },
9699
* // inputVariables: [ // PromptInputVariablesList
97100
* // { // PromptInputVariable
98101
* // name: "STRING_VALUE",
@@ -106,13 +109,17 @@ export interface GetFlowVersionCommandOutput extends GetFlowVersionResponse, __M
106109
* // content: [ // ContentBlocks // required
107110
* // { // ContentBlock Union: only one key present
108111
* // text: "STRING_VALUE",
112+
* // cachePoint: {
113+
* // type: "default", // required
114+
* // },
109115
* // },
110116
* // ],
111117
* // },
112118
* // ],
113119
* // system: [ // SystemContentBlocks
114120
* // { // SystemContentBlock Union: only one key present
115121
* // text: "STRING_VALUE",
122+
* // cachePoint: "<CachePointBlock>",
116123
* // },
117124
* // ],
118125
* // inputVariables: [
@@ -130,6 +137,7 @@ export interface GetFlowVersionCommandOutput extends GetFlowVersionResponse, __M
130137
* // json: "DOCUMENT_VALUE",
131138
* // },
132139
* // },
140+
* // cachePoint: "<CachePointBlock>",
133141
* // },
134142
* // ],
135143
* // toolChoice: { // ToolChoice Union: only one key present

clients/client-bedrock-agent/src/commands/GetKnowledgeBaseDocumentsCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { BedrockAgentClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../BedrockAgentClient";
88
import { commonParams } from "../endpoint/EndpointParameters";
9-
import { GetKnowledgeBaseDocumentsRequest, GetKnowledgeBaseDocumentsResponse } from "../models/models_0";
9+
import { GetKnowledgeBaseDocumentsRequest, GetKnowledgeBaseDocumentsResponse } from "../models/models_1";
1010
import { de_GetKnowledgeBaseDocumentsCommand, se_GetKnowledgeBaseDocumentsCommand } from "../protocols/Aws_restJson1";
1111

1212
/**

0 commit comments

Comments
 (0)