Skip to content

Commit f2bcb72

Browse files
author
awstools
committed
feat(client-lex-models-v2): Adds support for LLM as Primary, allowing usage of LLMs as the default NLU system.
1 parent 67d2919 commit f2bcb72

File tree

8 files changed

+151
-98
lines changed

8 files changed

+151
-98
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ export interface CreateBotLocaleCommandOutput extends CreateBotLocaleResponse, _
6565
* },
6666
* nluImprovement: { // NluImprovementSpecification
6767
* enabled: true || false, // required
68+
* assistedNluMode: "Primary" || "Fallback",
6869
* },
6970
* },
7071
* buildtimeSettings: { // BuildtimeSettings
@@ -126,6 +127,7 @@ export interface CreateBotLocaleCommandOutput extends CreateBotLocaleResponse, _
126127
* // },
127128
* // nluImprovement: { // NluImprovementSpecification
128129
* // enabled: true || false, // required
130+
* // assistedNluMode: "Primary" || "Fallback",
129131
* // },
130132
* // },
131133
* // buildtimeSettings: { // BuildtimeSettings

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

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

66
import { commonParams } from "../endpoint/EndpointParameters";
77
import { LexModelsV2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../LexModelsV2Client";
8-
import { DescribeBotRequest, DescribeBotResponse } from "../models/models_0";
8+
import { DescribeBotRequest } from "../models/models_0";
9+
import { DescribeBotResponse } from "../models/models_1";
910
import { DescribeBot } from "../schemas/schemas_0";
1011

1112
/**

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ export interface DescribeBotLocaleCommandOutput extends DescribeBotLocaleRespons
8888
* // },
8989
* // nluImprovement: { // NluImprovementSpecification
9090
* // enabled: true || false, // required
91+
* // assistedNluMode: "Primary" || "Fallback",
9192
* // },
9293
* // },
9394
* // buildtimeSettings: { // BuildtimeSettings

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export interface UpdateBotLocaleCommandOutput extends UpdateBotLocaleResponse, _
6262
* },
6363
* nluImprovement: { // NluImprovementSpecification
6464
* enabled: true || false, // required
65+
* assistedNluMode: "Primary" || "Fallback",
6566
* },
6667
* },
6768
* buildtimeSettings: { // BuildtimeSettings
@@ -130,6 +131,7 @@ export interface UpdateBotLocaleCommandOutput extends UpdateBotLocaleResponse, _
130131
* // },
131132
* // nluImprovement: { // NluImprovementSpecification
132133
* // enabled: true || false, // required
134+
* // assistedNluMode: "Primary" || "Fallback",
133135
* // },
134136
* // },
135137
* // buildtimeSettings: { // BuildtimeSettings

clients/client-lex-models-v2/src/models/models_0.ts

Lines changed: 23 additions & 93 deletions
Original file line numberDiff line numberDiff line change
@@ -2290,6 +2290,20 @@ export const AnalyticsUtteranceSortByName = {
22902290
export type AnalyticsUtteranceSortByName =
22912291
(typeof AnalyticsUtteranceSortByName)[keyof typeof AnalyticsUtteranceSortByName];
22922292

2293+
/**
2294+
* @public
2295+
* @enum
2296+
*/
2297+
export const AssistedNluMode = {
2298+
Fallback: "Fallback",
2299+
Primary: "Primary",
2300+
} as const;
2301+
2302+
/**
2303+
* @public
2304+
*/
2305+
export type AssistedNluMode = (typeof AssistedNluMode)[keyof typeof AssistedNluMode];
2306+
22932307
/**
22942308
* <p>The object containing information that associates the recommended
22952309
* intent/slot type with a conversation.</p>
@@ -5500,15 +5514,21 @@ export interface CreateBotAliasResponse {
55005514
}
55015515

55025516
/**
5503-
* <p>Specifies whether the assisted nlu feature is turned on or off.</p>
5517+
* <p>Configures the Assisted Natural Language Understanding (NLU) feature for your bot. This specification determines whether enhanced intent recognition and utterance understanding capabilities are active.</p>
55045518
* @public
55055519
*/
55065520
export interface NluImprovementSpecification {
55075521
/**
5508-
* <p>Specifies whether the assisted nlu feature is enabled.</p>
5522+
* <p>Determines whether the Assisted NLU feature is enabled for the bot. When set to <code>true</code>, Amazon Lex uses advanced models to improve intent recognition and slot resolution, with the default being <code>false</code>.</p>
55095523
* @public
55105524
*/
55115525
enabled: boolean | undefined;
5526+
5527+
/**
5528+
* <p>Specifies the mode for Assisted NLU operation. Use <code>Primary</code> to make Assisted NLU the primary intent recognition method, or <code>Fallback</code> to use it only when standard NLU confidence is low.</p>
5529+
* @public
5530+
*/
5531+
assistedNluMode?: AssistedNluMode | undefined;
55125532
}
55135533

55145534
/**
@@ -5541,7 +5561,7 @@ export interface RuntimeSettings {
55415561
slotResolutionImprovement?: SlotResolutionImprovementSpecification | undefined;
55425562

55435563
/**
5544-
* <p>An object containing specifications for the assisted nlu feature.</p>
5564+
* <p>An object containing specifications for the Assisted NLU feature within the bot's runtime settings. These settings determine how the bot processes and interprets user utterances during conversations.</p>
55455565
* @public
55465566
*/
55475567
nluImprovement?: NluImprovementSpecification | undefined;
@@ -8087,93 +8107,3 @@ export interface DescribeBotRequest {
80878107
*/
80888108
botId: string | undefined;
80898109
}
8090-
8091-
/**
8092-
* @public
8093-
*/
8094-
export interface DescribeBotResponse {
8095-
/**
8096-
* <p>The unique identifier of the bot.</p>
8097-
* @public
8098-
*/
8099-
botId?: string | undefined;
8100-
8101-
/**
8102-
* <p>The name of the bot.</p>
8103-
* @public
8104-
*/
8105-
botName?: string | undefined;
8106-
8107-
/**
8108-
* <p>The description of the bot. </p>
8109-
* @public
8110-
*/
8111-
description?: string | undefined;
8112-
8113-
/**
8114-
* <p>The Amazon Resource Name (ARN) of an IAM role that has permission to
8115-
* access the bot.</p>
8116-
* @public
8117-
*/
8118-
roleArn?: string | undefined;
8119-
8120-
/**
8121-
* <p>Settings for managing data privacy of the bot and its conversations
8122-
* with users.</p>
8123-
* @public
8124-
*/
8125-
dataPrivacy?: DataPrivacy | undefined;
8126-
8127-
/**
8128-
* <p>The maximum time in seconds that Amazon Lex retains the data gathered in
8129-
* a conversation.</p>
8130-
* @public
8131-
*/
8132-
idleSessionTTLInSeconds?: number | undefined;
8133-
8134-
/**
8135-
* <p>The current status of the bot. When the status is
8136-
* <code>Available</code> the bot is ready to be used in conversations
8137-
* with users.</p>
8138-
* @public
8139-
*/
8140-
botStatus?: BotStatus | undefined;
8141-
8142-
/**
8143-
* <p>A timestamp of the date and time that the bot was created.</p>
8144-
* @public
8145-
*/
8146-
creationDateTime?: Date | undefined;
8147-
8148-
/**
8149-
* <p>A timestamp of the date and time that the bot was last
8150-
* updated.</p>
8151-
* @public
8152-
*/
8153-
lastUpdatedDateTime?: Date | undefined;
8154-
8155-
/**
8156-
* <p>The type of the bot that was described.</p>
8157-
* @public
8158-
*/
8159-
botType?: BotType | undefined;
8160-
8161-
/**
8162-
* <p>The list of bots in the network that was described.</p>
8163-
* @public
8164-
*/
8165-
botMembers?: BotMember[] | undefined;
8166-
8167-
/**
8168-
* <p>If the <code>botStatus</code> is <code>Failed</code>, this contains
8169-
* a list of reasons that the bot couldn't be built.</p>
8170-
* @public
8171-
*/
8172-
failureReasons?: string[] | undefined;
8173-
8174-
/**
8175-
* <p>Contains the configuration for error logging that specifies where and how bot errors are recorded, including destinations like CloudWatch Logs.</p>
8176-
* @public
8177-
*/
8178-
errorLogSettings?: ErrorLogSettings | undefined;
8179-
}

clients/client-lex-models-v2/src/models/models_1.ts

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,96 @@ import {
116116
WaitAndContinueSpecification,
117117
} from "./models_0";
118118

119+
/**
120+
* @public
121+
*/
122+
export interface DescribeBotResponse {
123+
/**
124+
* <p>The unique identifier of the bot.</p>
125+
* @public
126+
*/
127+
botId?: string | undefined;
128+
129+
/**
130+
* <p>The name of the bot.</p>
131+
* @public
132+
*/
133+
botName?: string | undefined;
134+
135+
/**
136+
* <p>The description of the bot. </p>
137+
* @public
138+
*/
139+
description?: string | undefined;
140+
141+
/**
142+
* <p>The Amazon Resource Name (ARN) of an IAM role that has permission to
143+
* access the bot.</p>
144+
* @public
145+
*/
146+
roleArn?: string | undefined;
147+
148+
/**
149+
* <p>Settings for managing data privacy of the bot and its conversations
150+
* with users.</p>
151+
* @public
152+
*/
153+
dataPrivacy?: DataPrivacy | undefined;
154+
155+
/**
156+
* <p>The maximum time in seconds that Amazon Lex retains the data gathered in
157+
* a conversation.</p>
158+
* @public
159+
*/
160+
idleSessionTTLInSeconds?: number | undefined;
161+
162+
/**
163+
* <p>The current status of the bot. When the status is
164+
* <code>Available</code> the bot is ready to be used in conversations
165+
* with users.</p>
166+
* @public
167+
*/
168+
botStatus?: BotStatus | undefined;
169+
170+
/**
171+
* <p>A timestamp of the date and time that the bot was created.</p>
172+
* @public
173+
*/
174+
creationDateTime?: Date | undefined;
175+
176+
/**
177+
* <p>A timestamp of the date and time that the bot was last
178+
* updated.</p>
179+
* @public
180+
*/
181+
lastUpdatedDateTime?: Date | undefined;
182+
183+
/**
184+
* <p>The type of the bot that was described.</p>
185+
* @public
186+
*/
187+
botType?: BotType | undefined;
188+
189+
/**
190+
* <p>The list of bots in the network that was described.</p>
191+
* @public
192+
*/
193+
botMembers?: BotMember[] | undefined;
194+
195+
/**
196+
* <p>If the <code>botStatus</code> is <code>Failed</code>, this contains
197+
* a list of reasons that the bot couldn't be built.</p>
198+
* @public
199+
*/
200+
failureReasons?: string[] | undefined;
201+
202+
/**
203+
* <p>Contains the configuration for error logging that specifies where and how bot errors are recorded, including destinations like CloudWatch Logs.</p>
204+
* @public
205+
*/
206+
errorLogSettings?: ErrorLogSettings | undefined;
207+
}
208+
119209
/**
120210
* @public
121211
*/

clients/client-lex-models-v2/src/schemas/schemas_0.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,7 @@ const _aLRDT = "aggregationLastRefreshedDateTime";
701701
const _aLS = "audioLogSettings";
702702
const _aM = "apiMode";
703703
const _aMV = "allowMultipleValues";
704+
const _aNM = "assistedNluMode";
704705
const _aO = "actualOutput";
705706
const _aP = "agentPrompt";
706707
const _aR = "attributeResults";
@@ -3301,7 +3302,7 @@ export var MessageGroup: StaticStructureSchema = [
33013302
];
33023303
export var MultipleValuesSetting: StaticStructureSchema = [3, n0, _MVS, 0, [_aMV], [2]];
33033304
export var NewCustomVocabularyItem: StaticStructureSchema = [3, n0, _NCVI, 0, [_ph, _w, _dA], [0, 1, 0]];
3304-
export var NluImprovementSpecification: StaticStructureSchema = [3, n0, _NIS, 0, [_e], [2]];
3305+
export var NluImprovementSpecification: StaticStructureSchema = [3, n0, _NIS, 0, [_e, _aNM], [2, 0]];
33053306
export var ObfuscationSetting: StaticStructureSchema = [3, n0, _OS, 0, [_oST], [0]];
33063307
export var OpensearchConfiguration: StaticStructureSchema = [
33073308
3,

codegen/sdk-codegen/aws-models/lex-models-v2.json

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2082,6 +2082,26 @@
20822082
"com.amazonaws.lexmodelsv2#AnswerField": {
20832083
"type": "string"
20842084
},
2085+
"com.amazonaws.lexmodelsv2#AssistedNluMode": {
2086+
"type": "enum",
2087+
"members": {
2088+
"Primary": {
2089+
"target": "smithy.api#Unit",
2090+
"traits": {
2091+
"smithy.api#enumValue": "Primary"
2092+
}
2093+
},
2094+
"Fallback": {
2095+
"target": "smithy.api#Unit",
2096+
"traits": {
2097+
"smithy.api#enumValue": "Fallback"
2098+
}
2099+
}
2100+
},
2101+
"traits": {
2102+
"smithy.api#documentation": "<p>Defines the operational mode for Assisted Natural Language Understanding. This enum determines how the enhanced NLU capabilities integrate with standard intent recognition.</p>"
2103+
}
2104+
},
20852105
"com.amazonaws.lexmodelsv2#AssociatedTranscript": {
20862106
"type": "structure",
20872107
"members": {
@@ -18154,13 +18174,19 @@
1815418174
"target": "com.amazonaws.lexmodelsv2#Enabled",
1815518175
"traits": {
1815618176
"smithy.api#default": false,
18157-
"smithy.api#documentation": "<p>Specifies whether the assisted nlu feature is enabled.</p>",
18177+
"smithy.api#documentation": "<p>Determines whether the Assisted NLU feature is enabled for the bot. When set to <code>true</code>, Amazon Lex uses advanced models to improve intent recognition and slot resolution, with the default being <code>false</code>.</p>",
1815818178
"smithy.api#required": {}
1815918179
}
18180+
},
18181+
"assistedNluMode": {
18182+
"target": "com.amazonaws.lexmodelsv2#AssistedNluMode",
18183+
"traits": {
18184+
"smithy.api#documentation": "<p>Specifies the mode for Assisted NLU operation. Use <code>Primary</code> to make Assisted NLU the primary intent recognition method, or <code>Fallback</code> to use it only when standard NLU confidence is low.</p>"
18185+
}
1816018186
}
1816118187
},
1816218188
"traits": {
18163-
"smithy.api#documentation": "<p>Specifies whether the assisted nlu feature is turned on or off.</p>"
18189+
"smithy.api#documentation": "<p>Configures the Assisted Natural Language Understanding (NLU) feature for your bot. This specification determines whether enhanced intent recognition and utterance understanding capabilities are active.</p>"
1816418190
}
1816518191
},
1816618192
"com.amazonaws.lexmodelsv2#NonEmptyString": {
@@ -19143,7 +19169,7 @@
1914319169
"nluImprovement": {
1914419170
"target": "com.amazonaws.lexmodelsv2#NluImprovementSpecification",
1914519171
"traits": {
19146-
"smithy.api#documentation": "<p>An object containing specifications for the assisted nlu feature.</p>"
19172+
"smithy.api#documentation": "<p>An object containing specifications for the Assisted NLU feature within the bot's runtime settings. These settings determine how the bot processes and interprets user utterances during conversations.</p>"
1914719173
}
1914819174
}
1914919175
},

0 commit comments

Comments
 (0)