Skip to content

Commit

Permalink
feat(client-lex-models-v2): This release introduces new generative AI…
Browse files Browse the repository at this point in the history
… features in AWS Lex: Assisted Slot Resolution, Descriptive Bot Building, and Sample Utterance Generation. These features leverage large language models available through Amazon Bedrock to improve the bot builder and customer experiences.
  • Loading branch information
awstools committed Nov 27, 2023
1 parent c926466 commit 4d73e4a
Show file tree
Hide file tree
Showing 25 changed files with 3,381 additions and 417 deletions.
32 changes: 32 additions & 0 deletions clients/client-lex-models-v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,14 @@ DescribeBotRecommendation

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lex-models-v2/command/DescribeBotRecommendationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lex-models-v2/Interface/DescribeBotRecommendationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lex-models-v2/Interface/DescribeBotRecommendationCommandOutput/)

</details>
<details>
<summary>
DescribeBotResourceGeneration
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lex-models-v2/command/DescribeBotResourceGenerationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lex-models-v2/Interface/DescribeBotResourceGenerationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lex-models-v2/Interface/DescribeBotResourceGenerationCommandOutput/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -570,6 +578,14 @@ DescribeTestSetGeneration

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lex-models-v2/command/DescribeTestSetGenerationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lex-models-v2/Interface/DescribeTestSetGenerationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lex-models-v2/Interface/DescribeTestSetGenerationCommandOutput/)

</details>
<details>
<summary>
GenerateBotElement
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lex-models-v2/command/GenerateBotElementCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lex-models-v2/Interface/GenerateBotElementCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lex-models-v2/Interface/GenerateBotElementCommandOutput/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -610,6 +626,14 @@ ListBotRecommendations

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lex-models-v2/command/ListBotRecommendationsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lex-models-v2/Interface/ListBotRecommendationsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lex-models-v2/Interface/ListBotRecommendationsCommandOutput/)

</details>
<details>
<summary>
ListBotResourceGenerations
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lex-models-v2/command/ListBotResourceGenerationsCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lex-models-v2/Interface/ListBotResourceGenerationsCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lex-models-v2/Interface/ListBotResourceGenerationsCommandOutput/)

</details>
<details>
<summary>
Expand Down Expand Up @@ -810,6 +834,14 @@ StartBotRecommendation

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lex-models-v2/command/StartBotRecommendationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lex-models-v2/Interface/StartBotRecommendationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lex-models-v2/Interface/StartBotRecommendationCommandOutput/)

</details>
<details>
<summary>
StartBotResourceGeneration
</summary>

[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/client/lex-models-v2/command/StartBotResourceGenerationCommand/) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lex-models-v2/Interface/StartBotResourceGenerationCommandInput/) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/Package/-aws-sdk-client-lex-models-v2/Interface/StartBotResourceGenerationCommandOutput/)

</details>
<details>
<summary>
Expand Down
92 changes: 92 additions & 0 deletions clients/client-lex-models-v2/src/LexModelsV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ import {
DescribeBotRecommendationCommandInput,
DescribeBotRecommendationCommandOutput,
} from "./commands/DescribeBotRecommendationCommand";
import {
DescribeBotResourceGenerationCommand,
DescribeBotResourceGenerationCommandInput,
DescribeBotResourceGenerationCommandOutput,
} from "./commands/DescribeBotResourceGenerationCommand";
import {
DescribeBotVersionCommand,
DescribeBotVersionCommandInput,
Expand Down Expand Up @@ -212,6 +217,11 @@ import {
DescribeTestSetGenerationCommandInput,
DescribeTestSetGenerationCommandOutput,
} from "./commands/DescribeTestSetGenerationCommand";
import {
GenerateBotElementCommand,
GenerateBotElementCommandInput,
GenerateBotElementCommandOutput,
} from "./commands/GenerateBotElementCommand";
import {
GetTestExecutionArtifactsUrlCommand,
GetTestExecutionArtifactsUrlCommandInput,
Expand All @@ -237,6 +247,11 @@ import {
ListBotRecommendationsCommandInput,
ListBotRecommendationsCommandOutput,
} from "./commands/ListBotRecommendationsCommand";
import {
ListBotResourceGenerationsCommand,
ListBotResourceGenerationsCommandInput,
ListBotResourceGenerationsCommandOutput,
} from "./commands/ListBotResourceGenerationsCommand";
import { ListBotsCommand, ListBotsCommandInput, ListBotsCommandOutput } from "./commands/ListBotsCommand";
import {
ListBotVersionsCommand,
Expand Down Expand Up @@ -342,6 +357,11 @@ import {
StartBotRecommendationCommandInput,
StartBotRecommendationCommandOutput,
} from "./commands/StartBotRecommendationCommand";
import {
StartBotResourceGenerationCommand,
StartBotResourceGenerationCommandInput,
StartBotResourceGenerationCommandOutput,
} from "./commands/StartBotResourceGenerationCommand";
import { StartImportCommand, StartImportCommandInput, StartImportCommandOutput } from "./commands/StartImportCommand";
import {
StartTestExecutionCommand,
Expand Down Expand Up @@ -443,6 +463,7 @@ const commands = {
DescribeBotAliasCommand,
DescribeBotLocaleCommand,
DescribeBotRecommendationCommand,
DescribeBotResourceGenerationCommand,
DescribeBotVersionCommand,
DescribeCustomVocabularyMetadataCommand,
DescribeExportCommand,
Expand All @@ -455,11 +476,13 @@ const commands = {
DescribeTestSetCommand,
DescribeTestSetDiscrepancyReportCommand,
DescribeTestSetGenerationCommand,
GenerateBotElementCommand,
GetTestExecutionArtifactsUrlCommand,
ListAggregatedUtterancesCommand,
ListBotAliasesCommand,
ListBotLocalesCommand,
ListBotRecommendationsCommand,
ListBotResourceGenerationsCommand,
ListBotsCommand,
ListBotVersionsCommand,
ListBuiltInIntentsCommand,
Expand All @@ -485,6 +508,7 @@ const commands = {
ListUtteranceMetricsCommand,
SearchAssociatedTranscriptsCommand,
StartBotRecommendationCommand,
StartBotResourceGenerationCommand,
StartImportCommand,
StartTestExecutionCommand,
StartTestSetGenerationCommand,
Expand Down Expand Up @@ -992,6 +1016,23 @@ export interface LexModelsV2 {
cb: (err: any, data?: DescribeBotRecommendationCommandOutput) => void
): void;

/**
* @see {@link DescribeBotResourceGenerationCommand}
*/
describeBotResourceGeneration(
args: DescribeBotResourceGenerationCommandInput,
options?: __HttpHandlerOptions
): Promise<DescribeBotResourceGenerationCommandOutput>;
describeBotResourceGeneration(
args: DescribeBotResourceGenerationCommandInput,
cb: (err: any, data?: DescribeBotResourceGenerationCommandOutput) => void
): void;
describeBotResourceGeneration(
args: DescribeBotResourceGenerationCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: DescribeBotResourceGenerationCommandOutput) => void
): void;

/**
* @see {@link DescribeBotVersionCommand}
*/
Expand Down Expand Up @@ -1178,6 +1219,23 @@ export interface LexModelsV2 {
cb: (err: any, data?: DescribeTestSetGenerationCommandOutput) => void
): void;

/**
* @see {@link GenerateBotElementCommand}
*/
generateBotElement(
args: GenerateBotElementCommandInput,
options?: __HttpHandlerOptions
): Promise<GenerateBotElementCommandOutput>;
generateBotElement(
args: GenerateBotElementCommandInput,
cb: (err: any, data?: GenerateBotElementCommandOutput) => void
): void;
generateBotElement(
args: GenerateBotElementCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: GenerateBotElementCommandOutput) => void
): void;

/**
* @see {@link GetTestExecutionArtifactsUrlCommand}
*/
Expand Down Expand Up @@ -1257,6 +1315,23 @@ export interface LexModelsV2 {
cb: (err: any, data?: ListBotRecommendationsCommandOutput) => void
): void;

/**
* @see {@link ListBotResourceGenerationsCommand}
*/
listBotResourceGenerations(
args: ListBotResourceGenerationsCommandInput,
options?: __HttpHandlerOptions
): Promise<ListBotResourceGenerationsCommandOutput>;
listBotResourceGenerations(
args: ListBotResourceGenerationsCommandInput,
cb: (err: any, data?: ListBotResourceGenerationsCommandOutput) => void
): void;
listBotResourceGenerations(
args: ListBotResourceGenerationsCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: ListBotResourceGenerationsCommandOutput) => void
): void;

/**
* @see {@link ListBotsCommand}
*/
Expand Down Expand Up @@ -1634,6 +1709,23 @@ export interface LexModelsV2 {
cb: (err: any, data?: StartBotRecommendationCommandOutput) => void
): void;

/**
* @see {@link StartBotResourceGenerationCommand}
*/
startBotResourceGeneration(
args: StartBotResourceGenerationCommandInput,
options?: __HttpHandlerOptions
): Promise<StartBotResourceGenerationCommandOutput>;
startBotResourceGeneration(
args: StartBotResourceGenerationCommandInput,
cb: (err: any, data?: StartBotResourceGenerationCommandOutput) => void
): void;
startBotResourceGeneration(
args: StartBotResourceGenerationCommandInput,
options: __HttpHandlerOptions,
cb: (err: any, data?: StartBotResourceGenerationCommandOutput) => void
): void;

/**
* @see {@link StartImportCommand}
*/
Expand Down
21 changes: 21 additions & 0 deletions clients/client-lex-models-v2/src/LexModelsV2Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ import {
DescribeBotRecommendationCommandInput,
DescribeBotRecommendationCommandOutput,
} from "./commands/DescribeBotRecommendationCommand";
import {
DescribeBotResourceGenerationCommandInput,
DescribeBotResourceGenerationCommandOutput,
} from "./commands/DescribeBotResourceGenerationCommand";
import { DescribeBotVersionCommandInput, DescribeBotVersionCommandOutput } from "./commands/DescribeBotVersionCommand";
import {
DescribeCustomVocabularyMetadataCommandInput,
Expand Down Expand Up @@ -141,6 +145,7 @@ import {
DescribeTestSetGenerationCommandInput,
DescribeTestSetGenerationCommandOutput,
} from "./commands/DescribeTestSetGenerationCommand";
import { GenerateBotElementCommandInput, GenerateBotElementCommandOutput } from "./commands/GenerateBotElementCommand";
import {
GetTestExecutionArtifactsUrlCommandInput,
GetTestExecutionArtifactsUrlCommandOutput,
Expand All @@ -155,6 +160,10 @@ import {
ListBotRecommendationsCommandInput,
ListBotRecommendationsCommandOutput,
} from "./commands/ListBotRecommendationsCommand";
import {
ListBotResourceGenerationsCommandInput,
ListBotResourceGenerationsCommandOutput,
} from "./commands/ListBotResourceGenerationsCommand";
import { ListBotsCommandInput, ListBotsCommandOutput } from "./commands/ListBotsCommand";
import { ListBotVersionsCommandInput, ListBotVersionsCommandOutput } from "./commands/ListBotVersionsCommand";
import { ListBuiltInIntentsCommandInput, ListBuiltInIntentsCommandOutput } from "./commands/ListBuiltInIntentsCommand";
Expand Down Expand Up @@ -213,6 +222,10 @@ import {
StartBotRecommendationCommandInput,
StartBotRecommendationCommandOutput,
} from "./commands/StartBotRecommendationCommand";
import {
StartBotResourceGenerationCommandInput,
StartBotResourceGenerationCommandOutput,
} from "./commands/StartBotResourceGenerationCommand";
import { StartImportCommandInput, StartImportCommandOutput } from "./commands/StartImportCommand";
import { StartTestExecutionCommandInput, StartTestExecutionCommandOutput } from "./commands/StartTestExecutionCommand";
import {
Expand Down Expand Up @@ -290,6 +303,7 @@ export type ServiceInputTypes =
| DescribeBotCommandInput
| DescribeBotLocaleCommandInput
| DescribeBotRecommendationCommandInput
| DescribeBotResourceGenerationCommandInput
| DescribeBotVersionCommandInput
| DescribeCustomVocabularyMetadataCommandInput
| DescribeExportCommandInput
Expand All @@ -302,11 +316,13 @@ export type ServiceInputTypes =
| DescribeTestSetCommandInput
| DescribeTestSetDiscrepancyReportCommandInput
| DescribeTestSetGenerationCommandInput
| GenerateBotElementCommandInput
| GetTestExecutionArtifactsUrlCommandInput
| ListAggregatedUtterancesCommandInput
| ListBotAliasesCommandInput
| ListBotLocalesCommandInput
| ListBotRecommendationsCommandInput
| ListBotResourceGenerationsCommandInput
| ListBotVersionsCommandInput
| ListBotsCommandInput
| ListBuiltInIntentsCommandInput
Expand All @@ -332,6 +348,7 @@ export type ServiceInputTypes =
| ListUtteranceMetricsCommandInput
| SearchAssociatedTranscriptsCommandInput
| StartBotRecommendationCommandInput
| StartBotResourceGenerationCommandInput
| StartImportCommandInput
| StartTestExecutionCommandInput
| StartTestSetGenerationCommandInput
Expand Down Expand Up @@ -387,6 +404,7 @@ export type ServiceOutputTypes =
| DescribeBotCommandOutput
| DescribeBotLocaleCommandOutput
| DescribeBotRecommendationCommandOutput
| DescribeBotResourceGenerationCommandOutput
| DescribeBotVersionCommandOutput
| DescribeCustomVocabularyMetadataCommandOutput
| DescribeExportCommandOutput
Expand All @@ -399,11 +417,13 @@ export type ServiceOutputTypes =
| DescribeTestSetCommandOutput
| DescribeTestSetDiscrepancyReportCommandOutput
| DescribeTestSetGenerationCommandOutput
| GenerateBotElementCommandOutput
| GetTestExecutionArtifactsUrlCommandOutput
| ListAggregatedUtterancesCommandOutput
| ListBotAliasesCommandOutput
| ListBotLocalesCommandOutput
| ListBotRecommendationsCommandOutput
| ListBotResourceGenerationsCommandOutput
| ListBotVersionsCommandOutput
| ListBotsCommandOutput
| ListBuiltInIntentsCommandOutput
Expand All @@ -429,6 +449,7 @@ export type ServiceOutputTypes =
| ListUtteranceMetricsCommandOutput
| SearchAssociatedTranscriptsCommandOutput
| StartBotRecommendationCommandOutput
| StartBotResourceGenerationCommandOutput
| StartImportCommandOutput
| StartTestExecutionCommandOutput
| StartTestSetGenerationCommandOutput
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,30 @@ export interface CreateBotLocaleCommandOutput extends CreateBotLocaleResponse, _
* voiceId: "STRING_VALUE", // required
* engine: "standard" || "neural",
* },
* generativeAISettings: { // GenerativeAISettings
* runtimeSettings: { // RuntimeSettings
* slotResolutionImprovement: { // SlotResolutionImprovementSpecification
* enabled: true || false, // required
* bedrockModelSpecification: { // BedrockModelSpecification
* modelArn: "STRING_VALUE", // required
* },
* },
* },
* buildtimeSettings: { // BuildtimeSettings
* descriptiveBotBuilder: { // DescriptiveBotBuilderSpecification
* enabled: true || false, // required
* bedrockModelSpecification: {
* modelArn: "STRING_VALUE", // required
* },
* },
* sampleUtteranceGeneration: { // SampleUtteranceGenerationSpecification
* enabled: true || false, // required
* bedrockModelSpecification: {
* modelArn: "STRING_VALUE", // required
* },
* },
* },
* },
* };
* const command = new CreateBotLocaleCommand(input);
* const response = await client.send(command);
Expand All @@ -73,6 +97,30 @@ export interface CreateBotLocaleCommandOutput extends CreateBotLocaleResponse, _
* // },
* // botLocaleStatus: "Creating" || "Building" || "Built" || "ReadyExpressTesting" || "Failed" || "Deleting" || "NotBuilt" || "Importing" || "Processing",
* // creationDateTime: new Date("TIMESTAMP"),
* // generativeAISettings: { // GenerativeAISettings
* // runtimeSettings: { // RuntimeSettings
* // slotResolutionImprovement: { // SlotResolutionImprovementSpecification
* // enabled: true || false, // required
* // bedrockModelSpecification: { // BedrockModelSpecification
* // modelArn: "STRING_VALUE", // required
* // },
* // },
* // },
* // buildtimeSettings: { // BuildtimeSettings
* // descriptiveBotBuilder: { // DescriptiveBotBuilderSpecification
* // enabled: true || false, // required
* // bedrockModelSpecification: {
* // modelArn: "STRING_VALUE", // required
* // },
* // },
* // sampleUtteranceGeneration: { // SampleUtteranceGenerationSpecification
* // enabled: true || false, // required
* // bedrockModelSpecification: {
* // modelArn: "STRING_VALUE", // required
* // },
* // },
* // },
* // },
* // };
*
* ```
Expand Down
Loading

0 comments on commit 4d73e4a

Please sign in to comment.