Skip to content

Commit 4d9c7a1

Browse files
author
awstools
committed
feat(client-lex-models-v2): This release adds new capabilities to the AMAZON.QnAIntent: Custom prompting, Guardrails integration and ExactResponse support for Bedrock Knowledge Base.
1 parent 3cf46f1 commit 4d9c7a1

13 files changed

+534
-197
lines changed

clients/client-lex-models-v2/src/commands/CreateBotLocaleCommand.ts

+36
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ export interface CreateBotLocaleCommandOutput extends CreateBotLocaleResponse, _
5454
* enabled: true || false, // required
5555
* bedrockModelSpecification: { // BedrockModelSpecification
5656
* modelArn: "STRING_VALUE", // required
57+
* guardrail: { // BedrockGuardrailConfiguration
58+
* identifier: "STRING_VALUE", // required
59+
* version: "STRING_VALUE", // required
60+
* },
61+
* traceStatus: "ENABLED" || "DISABLED",
62+
* customPrompt: "STRING_VALUE",
5763
* },
5864
* },
5965
* },
@@ -62,12 +68,24 @@ export interface CreateBotLocaleCommandOutput extends CreateBotLocaleResponse, _
6268
* enabled: true || false, // required
6369
* bedrockModelSpecification: {
6470
* modelArn: "STRING_VALUE", // required
71+
* guardrail: {
72+
* identifier: "STRING_VALUE", // required
73+
* version: "STRING_VALUE", // required
74+
* },
75+
* traceStatus: "ENABLED" || "DISABLED",
76+
* customPrompt: "STRING_VALUE",
6577
* },
6678
* },
6779
* sampleUtteranceGeneration: { // SampleUtteranceGenerationSpecification
6880
* enabled: true || false, // required
6981
* bedrockModelSpecification: {
7082
* modelArn: "STRING_VALUE", // required
83+
* guardrail: {
84+
* identifier: "STRING_VALUE", // required
85+
* version: "STRING_VALUE", // required
86+
* },
87+
* traceStatus: "ENABLED" || "DISABLED",
88+
* customPrompt: "STRING_VALUE",
7189
* },
7290
* },
7391
* },
@@ -94,6 +112,12 @@ export interface CreateBotLocaleCommandOutput extends CreateBotLocaleResponse, _
94112
* // enabled: true || false, // required
95113
* // bedrockModelSpecification: { // BedrockModelSpecification
96114
* // modelArn: "STRING_VALUE", // required
115+
* // guardrail: { // BedrockGuardrailConfiguration
116+
* // identifier: "STRING_VALUE", // required
117+
* // version: "STRING_VALUE", // required
118+
* // },
119+
* // traceStatus: "ENABLED" || "DISABLED",
120+
* // customPrompt: "STRING_VALUE",
97121
* // },
98122
* // },
99123
* // },
@@ -102,12 +126,24 @@ export interface CreateBotLocaleCommandOutput extends CreateBotLocaleResponse, _
102126
* // enabled: true || false, // required
103127
* // bedrockModelSpecification: {
104128
* // modelArn: "STRING_VALUE", // required
129+
* // guardrail: {
130+
* // identifier: "STRING_VALUE", // required
131+
* // version: "STRING_VALUE", // required
132+
* // },
133+
* // traceStatus: "ENABLED" || "DISABLED",
134+
* // customPrompt: "STRING_VALUE",
105135
* // },
106136
* // },
107137
* // sampleUtteranceGeneration: { // SampleUtteranceGenerationSpecification
108138
* // enabled: true || false, // required
109139
* // bedrockModelSpecification: {
110140
* // modelArn: "STRING_VALUE", // required
141+
* // guardrail: {
142+
* // identifier: "STRING_VALUE", // required
143+
* // version: "STRING_VALUE", // required
144+
* // },
145+
* // traceStatus: "ENABLED" || "DISABLED",
146+
* // customPrompt: "STRING_VALUE",
111147
* // },
112148
* // },
113149
* // },

clients/client-lex-models-v2/src/commands/CreateIntentCommand.ts

+20
Original file line numberDiff line numberDiff line change
@@ -523,10 +523,20 @@ export interface CreateIntentCommandOutput extends CreateIntentResponse, __Metad
523523
* },
524524
* bedrockKnowledgeStoreConfiguration: { // BedrockKnowledgeStoreConfiguration
525525
* bedrockKnowledgeBaseArn: "STRING_VALUE", // required
526+
* exactResponse: true || false,
527+
* exactResponseFields: { // BedrockKnowledgeStoreExactResponseFields
528+
* answerField: "STRING_VALUE",
529+
* },
526530
* },
527531
* },
528532
* bedrockModelConfiguration: { // BedrockModelSpecification
529533
* modelArn: "STRING_VALUE", // required
534+
* guardrail: { // BedrockGuardrailConfiguration
535+
* identifier: "STRING_VALUE", // required
536+
* version: "STRING_VALUE", // required
537+
* },
538+
* traceStatus: "ENABLED" || "DISABLED",
539+
* customPrompt: "STRING_VALUE",
530540
* },
531541
* },
532542
* };
@@ -985,10 +995,20 @@ export interface CreateIntentCommandOutput extends CreateIntentResponse, __Metad
985995
* // },
986996
* // bedrockKnowledgeStoreConfiguration: { // BedrockKnowledgeStoreConfiguration
987997
* // bedrockKnowledgeBaseArn: "STRING_VALUE", // required
998+
* // exactResponse: true || false,
999+
* // exactResponseFields: { // BedrockKnowledgeStoreExactResponseFields
1000+
* // answerField: "STRING_VALUE",
1001+
* // },
9881002
* // },
9891003
* // },
9901004
* // bedrockModelConfiguration: { // BedrockModelSpecification
9911005
* // modelArn: "STRING_VALUE", // required
1006+
* // guardrail: { // BedrockGuardrailConfiguration
1007+
* // identifier: "STRING_VALUE", // required
1008+
* // version: "STRING_VALUE", // required
1009+
* // },
1010+
* // traceStatus: "ENABLED" || "DISABLED",
1011+
* // customPrompt: "STRING_VALUE",
9921012
* // },
9931013
* // },
9941014
* // };

clients/client-lex-models-v2/src/commands/CreateResourcePolicyStatementCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ export interface CreateResourcePolicyStatementCommandOutput
3838
* policy. If a policy doesn't exist, a new policy is created.</p>
3939
* <p>You can't create a resource policy statement that allows
4040
* cross-account access.</p>
41+
* <p>You need to add the <code>CreateResourcePolicy</code> or <code>UpdateResourcePolicy</code>
42+
* action to the bot role in order to call the API.</p>
4143
* @example
4244
* Use a bare-bones client and the command you need to make an API call.
4345
* ```javascript

clients/client-lex-models-v2/src/commands/DeleteResourcePolicyStatementCommand.ts

+2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ export interface DeleteResourcePolicyStatementCommandOutput
3838
* statement ID that doesn't exist in the policy, or if the bot or bot
3939
* alias doesn't have a policy attached, Amazon Lex returns an
4040
* exception.</p>
41+
* <p>You need to add the <code>DeleteResourcePolicy</code> or <code>UpdateResourcePolicy</code>
42+
* action to the bot role in order to call the API.</p>
4143
* @example
4244
* Use a bare-bones client and the command you need to make an API call.
4345
* ```javascript

clients/client-lex-models-v2/src/commands/DescribeBotLocaleCommand.ts

+20-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { commonParams } from "../endpoint/EndpointParameters";
88
import { LexModelsV2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LexModelsV2Client";
9-
import { DescribeBotLocaleRequest, DescribeBotLocaleResponse } from "../models/models_0";
9+
import { DescribeBotLocaleRequest } from "../models/models_0";
10+
import { DescribeBotLocaleResponse } from "../models/models_1";
1011
import { de_DescribeBotLocaleCommand, se_DescribeBotLocaleCommand } from "../protocols/Aws_restJson1";
1112

1213
/**
@@ -77,6 +78,12 @@ export interface DescribeBotLocaleCommandOutput extends DescribeBotLocaleRespons
7778
* // enabled: true || false, // required
7879
* // bedrockModelSpecification: { // BedrockModelSpecification
7980
* // modelArn: "STRING_VALUE", // required
81+
* // guardrail: { // BedrockGuardrailConfiguration
82+
* // identifier: "STRING_VALUE", // required
83+
* // version: "STRING_VALUE", // required
84+
* // },
85+
* // traceStatus: "ENABLED" || "DISABLED",
86+
* // customPrompt: "STRING_VALUE",
8087
* // },
8188
* // },
8289
* // },
@@ -85,12 +92,24 @@ export interface DescribeBotLocaleCommandOutput extends DescribeBotLocaleRespons
8592
* // enabled: true || false, // required
8693
* // bedrockModelSpecification: {
8794
* // modelArn: "STRING_VALUE", // required
95+
* // guardrail: {
96+
* // identifier: "STRING_VALUE", // required
97+
* // version: "STRING_VALUE", // required
98+
* // },
99+
* // traceStatus: "ENABLED" || "DISABLED",
100+
* // customPrompt: "STRING_VALUE",
88101
* // },
89102
* // },
90103
* // sampleUtteranceGeneration: { // SampleUtteranceGenerationSpecification
91104
* // enabled: true || false, // required
92105
* // bedrockModelSpecification: {
93106
* // modelArn: "STRING_VALUE", // required
107+
* // guardrail: {
108+
* // identifier: "STRING_VALUE", // required
109+
* // version: "STRING_VALUE", // required
110+
* // },
111+
* // traceStatus: "ENABLED" || "DISABLED",
112+
* // customPrompt: "STRING_VALUE",
94113
* // },
95114
* // },
96115
* // },

clients/client-lex-models-v2/src/commands/DescribeBotRecommendationCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";
66

77
import { commonParams } from "../endpoint/EndpointParameters";
88
import { LexModelsV2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LexModelsV2Client";
9-
import { DescribeBotRecommendationRequest } from "../models/models_0";
109
import {
10+
DescribeBotRecommendationRequest,
1111
DescribeBotRecommendationResponse,
1212
DescribeBotRecommendationResponseFilterSensitiveLog,
1313
} from "../models/models_1";

clients/client-lex-models-v2/src/commands/DescribeIntentCommand.ts

+10
Original file line numberDiff line numberDiff line change
@@ -503,10 +503,20 @@ export interface DescribeIntentCommandOutput extends DescribeIntentResponse, __M
503503
* // },
504504
* // bedrockKnowledgeStoreConfiguration: { // BedrockKnowledgeStoreConfiguration
505505
* // bedrockKnowledgeBaseArn: "STRING_VALUE", // required
506+
* // exactResponse: true || false,
507+
* // exactResponseFields: { // BedrockKnowledgeStoreExactResponseFields
508+
* // answerField: "STRING_VALUE",
509+
* // },
506510
* // },
507511
* // },
508512
* // bedrockModelConfiguration: { // BedrockModelSpecification
509513
* // modelArn: "STRING_VALUE", // required
514+
* // guardrail: { // BedrockGuardrailConfiguration
515+
* // identifier: "STRING_VALUE", // required
516+
* // version: "STRING_VALUE", // required
517+
* // },
518+
* // traceStatus: "ENABLED" || "DISABLED",
519+
* // customPrompt: "STRING_VALUE",
510520
* // },
511521
* // },
512522
* // };

clients/client-lex-models-v2/src/commands/UpdateBotLocaleCommand.ts

+36
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ export interface UpdateBotLocaleCommandOutput extends UpdateBotLocaleResponse, _
5151
* enabled: true || false, // required
5252
* bedrockModelSpecification: { // BedrockModelSpecification
5353
* modelArn: "STRING_VALUE", // required
54+
* guardrail: { // BedrockGuardrailConfiguration
55+
* identifier: "STRING_VALUE", // required
56+
* version: "STRING_VALUE", // required
57+
* },
58+
* traceStatus: "ENABLED" || "DISABLED",
59+
* customPrompt: "STRING_VALUE",
5460
* },
5561
* },
5662
* },
@@ -59,12 +65,24 @@ export interface UpdateBotLocaleCommandOutput extends UpdateBotLocaleResponse, _
5965
* enabled: true || false, // required
6066
* bedrockModelSpecification: {
6167
* modelArn: "STRING_VALUE", // required
68+
* guardrail: {
69+
* identifier: "STRING_VALUE", // required
70+
* version: "STRING_VALUE", // required
71+
* },
72+
* traceStatus: "ENABLED" || "DISABLED",
73+
* customPrompt: "STRING_VALUE",
6274
* },
6375
* },
6476
* sampleUtteranceGeneration: { // SampleUtteranceGenerationSpecification
6577
* enabled: true || false, // required
6678
* bedrockModelSpecification: {
6779
* modelArn: "STRING_VALUE", // required
80+
* guardrail: {
81+
* identifier: "STRING_VALUE", // required
82+
* version: "STRING_VALUE", // required
83+
* },
84+
* traceStatus: "ENABLED" || "DISABLED",
85+
* customPrompt: "STRING_VALUE",
6886
* },
6987
* },
7088
* },
@@ -98,6 +116,12 @@ export interface UpdateBotLocaleCommandOutput extends UpdateBotLocaleResponse, _
98116
* // enabled: true || false, // required
99117
* // bedrockModelSpecification: { // BedrockModelSpecification
100118
* // modelArn: "STRING_VALUE", // required
119+
* // guardrail: { // BedrockGuardrailConfiguration
120+
* // identifier: "STRING_VALUE", // required
121+
* // version: "STRING_VALUE", // required
122+
* // },
123+
* // traceStatus: "ENABLED" || "DISABLED",
124+
* // customPrompt: "STRING_VALUE",
101125
* // },
102126
* // },
103127
* // },
@@ -106,12 +130,24 @@ export interface UpdateBotLocaleCommandOutput extends UpdateBotLocaleResponse, _
106130
* // enabled: true || false, // required
107131
* // bedrockModelSpecification: {
108132
* // modelArn: "STRING_VALUE", // required
133+
* // guardrail: {
134+
* // identifier: "STRING_VALUE", // required
135+
* // version: "STRING_VALUE", // required
136+
* // },
137+
* // traceStatus: "ENABLED" || "DISABLED",
138+
* // customPrompt: "STRING_VALUE",
109139
* // },
110140
* // },
111141
* // sampleUtteranceGeneration: { // SampleUtteranceGenerationSpecification
112142
* // enabled: true || false, // required
113143
* // bedrockModelSpecification: {
114144
* // modelArn: "STRING_VALUE", // required
145+
* // guardrail: {
146+
* // identifier: "STRING_VALUE", // required
147+
* // version: "STRING_VALUE", // required
148+
* // },
149+
* // traceStatus: "ENABLED" || "DISABLED",
150+
* // customPrompt: "STRING_VALUE",
115151
* // },
116152
* // },
117153
* // },

clients/client-lex-models-v2/src/commands/UpdateIntentCommand.ts

+20
Original file line numberDiff line numberDiff line change
@@ -493,10 +493,20 @@ export interface UpdateIntentCommandOutput extends UpdateIntentResponse, __Metad
493493
* },
494494
* bedrockKnowledgeStoreConfiguration: { // BedrockKnowledgeStoreConfiguration
495495
* bedrockKnowledgeBaseArn: "STRING_VALUE", // required
496+
* exactResponse: true || false,
497+
* exactResponseFields: { // BedrockKnowledgeStoreExactResponseFields
498+
* answerField: "STRING_VALUE",
499+
* },
496500
* },
497501
* },
498502
* bedrockModelConfiguration: { // BedrockModelSpecification
499503
* modelArn: "STRING_VALUE", // required
504+
* guardrail: { // BedrockGuardrailConfiguration
505+
* identifier: "STRING_VALUE", // required
506+
* version: "STRING_VALUE", // required
507+
* },
508+
* traceStatus: "ENABLED" || "DISABLED",
509+
* customPrompt: "STRING_VALUE",
500510
* },
501511
* },
502512
* };
@@ -962,10 +972,20 @@ export interface UpdateIntentCommandOutput extends UpdateIntentResponse, __Metad
962972
* // },
963973
* // bedrockKnowledgeStoreConfiguration: { // BedrockKnowledgeStoreConfiguration
964974
* // bedrockKnowledgeBaseArn: "STRING_VALUE", // required
975+
* // exactResponse: true || false,
976+
* // exactResponseFields: { // BedrockKnowledgeStoreExactResponseFields
977+
* // answerField: "STRING_VALUE",
978+
* // },
965979
* // },
966980
* // },
967981
* // bedrockModelConfiguration: { // BedrockModelSpecification
968982
* // modelArn: "STRING_VALUE", // required
983+
* // guardrail: { // BedrockGuardrailConfiguration
984+
* // identifier: "STRING_VALUE", // required
985+
* // version: "STRING_VALUE", // required
986+
* // },
987+
* // traceStatus: "ENABLED" || "DISABLED",
988+
* // customPrompt: "STRING_VALUE",
969989
* // },
970990
* // },
971991
* // };

0 commit comments

Comments
 (0)