Skip to content

Commit

Permalink
feat(client-lex-models-v2): This release adds new capabilities to the…
Browse files Browse the repository at this point in the history
… AMAZON.QnAIntent: Custom prompting, Guardrails integration and ExactResponse support for Bedrock Knowledge Base.
  • Loading branch information
awstools committed Jul 30, 2024
1 parent 3cf46f1 commit 4d9c7a1
Show file tree
Hide file tree
Showing 13 changed files with 534 additions and 197 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ export interface CreateBotLocaleCommandOutput extends CreateBotLocaleResponse, _
* enabled: true || false, // required
* bedrockModelSpecification: { // BedrockModelSpecification
* modelArn: "STRING_VALUE", // required
* guardrail: { // BedrockGuardrailConfiguration
* identifier: "STRING_VALUE", // required
* version: "STRING_VALUE", // required
* },
* traceStatus: "ENABLED" || "DISABLED",
* customPrompt: "STRING_VALUE",
* },
* },
* },
Expand All @@ -62,12 +68,24 @@ export interface CreateBotLocaleCommandOutput extends CreateBotLocaleResponse, _
* enabled: true || false, // required
* bedrockModelSpecification: {
* modelArn: "STRING_VALUE", // required
* guardrail: {
* identifier: "STRING_VALUE", // required
* version: "STRING_VALUE", // required
* },
* traceStatus: "ENABLED" || "DISABLED",
* customPrompt: "STRING_VALUE",
* },
* },
* sampleUtteranceGeneration: { // SampleUtteranceGenerationSpecification
* enabled: true || false, // required
* bedrockModelSpecification: {
* modelArn: "STRING_VALUE", // required
* guardrail: {
* identifier: "STRING_VALUE", // required
* version: "STRING_VALUE", // required
* },
* traceStatus: "ENABLED" || "DISABLED",
* customPrompt: "STRING_VALUE",
* },
* },
* },
Expand All @@ -94,6 +112,12 @@ export interface CreateBotLocaleCommandOutput extends CreateBotLocaleResponse, _
* // enabled: true || false, // required
* // bedrockModelSpecification: { // BedrockModelSpecification
* // modelArn: "STRING_VALUE", // required
* // guardrail: { // BedrockGuardrailConfiguration
* // identifier: "STRING_VALUE", // required
* // version: "STRING_VALUE", // required
* // },
* // traceStatus: "ENABLED" || "DISABLED",
* // customPrompt: "STRING_VALUE",
* // },
* // },
* // },
Expand All @@ -102,12 +126,24 @@ export interface CreateBotLocaleCommandOutput extends CreateBotLocaleResponse, _
* // enabled: true || false, // required
* // bedrockModelSpecification: {
* // modelArn: "STRING_VALUE", // required
* // guardrail: {
* // identifier: "STRING_VALUE", // required
* // version: "STRING_VALUE", // required
* // },
* // traceStatus: "ENABLED" || "DISABLED",
* // customPrompt: "STRING_VALUE",
* // },
* // },
* // sampleUtteranceGeneration: { // SampleUtteranceGenerationSpecification
* // enabled: true || false, // required
* // bedrockModelSpecification: {
* // modelArn: "STRING_VALUE", // required
* // guardrail: {
* // identifier: "STRING_VALUE", // required
* // version: "STRING_VALUE", // required
* // },
* // traceStatus: "ENABLED" || "DISABLED",
* // customPrompt: "STRING_VALUE",
* // },
* // },
* // },
Expand Down
20 changes: 20 additions & 0 deletions clients/client-lex-models-v2/src/commands/CreateIntentCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -523,10 +523,20 @@ export interface CreateIntentCommandOutput extends CreateIntentResponse, __Metad
* },
* bedrockKnowledgeStoreConfiguration: { // BedrockKnowledgeStoreConfiguration
* bedrockKnowledgeBaseArn: "STRING_VALUE", // required
* exactResponse: true || false,
* exactResponseFields: { // BedrockKnowledgeStoreExactResponseFields
* answerField: "STRING_VALUE",
* },
* },
* },
* bedrockModelConfiguration: { // BedrockModelSpecification
* modelArn: "STRING_VALUE", // required
* guardrail: { // BedrockGuardrailConfiguration
* identifier: "STRING_VALUE", // required
* version: "STRING_VALUE", // required
* },
* traceStatus: "ENABLED" || "DISABLED",
* customPrompt: "STRING_VALUE",
* },
* },
* };
Expand Down Expand Up @@ -985,10 +995,20 @@ export interface CreateIntentCommandOutput extends CreateIntentResponse, __Metad
* // },
* // bedrockKnowledgeStoreConfiguration: { // BedrockKnowledgeStoreConfiguration
* // bedrockKnowledgeBaseArn: "STRING_VALUE", // required
* // exactResponse: true || false,
* // exactResponseFields: { // BedrockKnowledgeStoreExactResponseFields
* // answerField: "STRING_VALUE",
* // },
* // },
* // },
* // bedrockModelConfiguration: { // BedrockModelSpecification
* // modelArn: "STRING_VALUE", // required
* // guardrail: { // BedrockGuardrailConfiguration
* // identifier: "STRING_VALUE", // required
* // version: "STRING_VALUE", // required
* // },
* // traceStatus: "ENABLED" || "DISABLED",
* // customPrompt: "STRING_VALUE",
* // },
* // },
* // };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ export interface CreateResourcePolicyStatementCommandOutput
* policy. If a policy doesn't exist, a new policy is created.</p>
* <p>You can't create a resource policy statement that allows
* cross-account access.</p>
* <p>You need to add the <code>CreateResourcePolicy</code> or <code>UpdateResourcePolicy</code>
* action to the bot role in order to call the API.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ export interface DeleteResourcePolicyStatementCommandOutput
* statement ID that doesn't exist in the policy, or if the bot or bot
* alias doesn't have a policy attached, Amazon Lex returns an
* exception.</p>
* <p>You need to add the <code>DeleteResourcePolicy</code> or <code>UpdateResourcePolicy</code>
* action to the bot role in order to call the API.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { LexModelsV2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LexModelsV2Client";
import { DescribeBotLocaleRequest, DescribeBotLocaleResponse } from "../models/models_0";
import { DescribeBotLocaleRequest } from "../models/models_0";
import { DescribeBotLocaleResponse } from "../models/models_1";
import { de_DescribeBotLocaleCommand, se_DescribeBotLocaleCommand } from "../protocols/Aws_restJson1";

/**
Expand Down Expand Up @@ -77,6 +78,12 @@ export interface DescribeBotLocaleCommandOutput extends DescribeBotLocaleRespons
* // enabled: true || false, // required
* // bedrockModelSpecification: { // BedrockModelSpecification
* // modelArn: "STRING_VALUE", // required
* // guardrail: { // BedrockGuardrailConfiguration
* // identifier: "STRING_VALUE", // required
* // version: "STRING_VALUE", // required
* // },
* // traceStatus: "ENABLED" || "DISABLED",
* // customPrompt: "STRING_VALUE",
* // },
* // },
* // },
Expand All @@ -85,12 +92,24 @@ export interface DescribeBotLocaleCommandOutput extends DescribeBotLocaleRespons
* // enabled: true || false, // required
* // bedrockModelSpecification: {
* // modelArn: "STRING_VALUE", // required
* // guardrail: {
* // identifier: "STRING_VALUE", // required
* // version: "STRING_VALUE", // required
* // },
* // traceStatus: "ENABLED" || "DISABLED",
* // customPrompt: "STRING_VALUE",
* // },
* // },
* // sampleUtteranceGeneration: { // SampleUtteranceGenerationSpecification
* // enabled: true || false, // required
* // bedrockModelSpecification: {
* // modelArn: "STRING_VALUE", // required
* // guardrail: {
* // identifier: "STRING_VALUE", // required
* // version: "STRING_VALUE", // required
* // },
* // traceStatus: "ENABLED" || "DISABLED",
* // customPrompt: "STRING_VALUE",
* // },
* // },
* // },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import { MetadataBearer as __MetadataBearer } from "@smithy/types";

import { commonParams } from "../endpoint/EndpointParameters";
import { LexModelsV2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LexModelsV2Client";
import { DescribeBotRecommendationRequest } from "../models/models_0";
import {
DescribeBotRecommendationRequest,
DescribeBotRecommendationResponse,
DescribeBotRecommendationResponseFilterSensitiveLog,
} from "../models/models_1";
Expand Down
10 changes: 10 additions & 0 deletions clients/client-lex-models-v2/src/commands/DescribeIntentCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -503,10 +503,20 @@ export interface DescribeIntentCommandOutput extends DescribeIntentResponse, __M
* // },
* // bedrockKnowledgeStoreConfiguration: { // BedrockKnowledgeStoreConfiguration
* // bedrockKnowledgeBaseArn: "STRING_VALUE", // required
* // exactResponse: true || false,
* // exactResponseFields: { // BedrockKnowledgeStoreExactResponseFields
* // answerField: "STRING_VALUE",
* // },
* // },
* // },
* // bedrockModelConfiguration: { // BedrockModelSpecification
* // modelArn: "STRING_VALUE", // required
* // guardrail: { // BedrockGuardrailConfiguration
* // identifier: "STRING_VALUE", // required
* // version: "STRING_VALUE", // required
* // },
* // traceStatus: "ENABLED" || "DISABLED",
* // customPrompt: "STRING_VALUE",
* // },
* // },
* // };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ export interface UpdateBotLocaleCommandOutput extends UpdateBotLocaleResponse, _
* enabled: true || false, // required
* bedrockModelSpecification: { // BedrockModelSpecification
* modelArn: "STRING_VALUE", // required
* guardrail: { // BedrockGuardrailConfiguration
* identifier: "STRING_VALUE", // required
* version: "STRING_VALUE", // required
* },
* traceStatus: "ENABLED" || "DISABLED",
* customPrompt: "STRING_VALUE",
* },
* },
* },
Expand All @@ -59,12 +65,24 @@ export interface UpdateBotLocaleCommandOutput extends UpdateBotLocaleResponse, _
* enabled: true || false, // required
* bedrockModelSpecification: {
* modelArn: "STRING_VALUE", // required
* guardrail: {
* identifier: "STRING_VALUE", // required
* version: "STRING_VALUE", // required
* },
* traceStatus: "ENABLED" || "DISABLED",
* customPrompt: "STRING_VALUE",
* },
* },
* sampleUtteranceGeneration: { // SampleUtteranceGenerationSpecification
* enabled: true || false, // required
* bedrockModelSpecification: {
* modelArn: "STRING_VALUE", // required
* guardrail: {
* identifier: "STRING_VALUE", // required
* version: "STRING_VALUE", // required
* },
* traceStatus: "ENABLED" || "DISABLED",
* customPrompt: "STRING_VALUE",
* },
* },
* },
Expand Down Expand Up @@ -98,6 +116,12 @@ export interface UpdateBotLocaleCommandOutput extends UpdateBotLocaleResponse, _
* // enabled: true || false, // required
* // bedrockModelSpecification: { // BedrockModelSpecification
* // modelArn: "STRING_VALUE", // required
* // guardrail: { // BedrockGuardrailConfiguration
* // identifier: "STRING_VALUE", // required
* // version: "STRING_VALUE", // required
* // },
* // traceStatus: "ENABLED" || "DISABLED",
* // customPrompt: "STRING_VALUE",
* // },
* // },
* // },
Expand All @@ -106,12 +130,24 @@ export interface UpdateBotLocaleCommandOutput extends UpdateBotLocaleResponse, _
* // enabled: true || false, // required
* // bedrockModelSpecification: {
* // modelArn: "STRING_VALUE", // required
* // guardrail: {
* // identifier: "STRING_VALUE", // required
* // version: "STRING_VALUE", // required
* // },
* // traceStatus: "ENABLED" || "DISABLED",
* // customPrompt: "STRING_VALUE",
* // },
* // },
* // sampleUtteranceGeneration: { // SampleUtteranceGenerationSpecification
* // enabled: true || false, // required
* // bedrockModelSpecification: {
* // modelArn: "STRING_VALUE", // required
* // guardrail: {
* // identifier: "STRING_VALUE", // required
* // version: "STRING_VALUE", // required
* // },
* // traceStatus: "ENABLED" || "DISABLED",
* // customPrompt: "STRING_VALUE",
* // },
* // },
* // },
Expand Down
20 changes: 20 additions & 0 deletions clients/client-lex-models-v2/src/commands/UpdateIntentCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -493,10 +493,20 @@ export interface UpdateIntentCommandOutput extends UpdateIntentResponse, __Metad
* },
* bedrockKnowledgeStoreConfiguration: { // BedrockKnowledgeStoreConfiguration
* bedrockKnowledgeBaseArn: "STRING_VALUE", // required
* exactResponse: true || false,
* exactResponseFields: { // BedrockKnowledgeStoreExactResponseFields
* answerField: "STRING_VALUE",
* },
* },
* },
* bedrockModelConfiguration: { // BedrockModelSpecification
* modelArn: "STRING_VALUE", // required
* guardrail: { // BedrockGuardrailConfiguration
* identifier: "STRING_VALUE", // required
* version: "STRING_VALUE", // required
* },
* traceStatus: "ENABLED" || "DISABLED",
* customPrompt: "STRING_VALUE",
* },
* },
* };
Expand Down Expand Up @@ -962,10 +972,20 @@ export interface UpdateIntentCommandOutput extends UpdateIntentResponse, __Metad
* // },
* // bedrockKnowledgeStoreConfiguration: { // BedrockKnowledgeStoreConfiguration
* // bedrockKnowledgeBaseArn: "STRING_VALUE", // required
* // exactResponse: true || false,
* // exactResponseFields: { // BedrockKnowledgeStoreExactResponseFields
* // answerField: "STRING_VALUE",
* // },
* // },
* // },
* // bedrockModelConfiguration: { // BedrockModelSpecification
* // modelArn: "STRING_VALUE", // required
* // guardrail: { // BedrockGuardrailConfiguration
* // identifier: "STRING_VALUE", // required
* // version: "STRING_VALUE", // required
* // },
* // traceStatus: "ENABLED" || "DISABLED",
* // customPrompt: "STRING_VALUE",
* // },
* // },
* // };
Expand Down
Loading

0 comments on commit 4d9c7a1

Please sign in to comment.