diff --git a/clients/client-lex-models-v2/src/commands/CreateIntentCommand.ts b/clients/client-lex-models-v2/src/commands/CreateIntentCommand.ts index 83a0fc2a452f..d5883630a7b2 100644 --- a/clients/client-lex-models-v2/src/commands/CreateIntentCommand.ts +++ b/clients/client-lex-models-v2/src/commands/CreateIntentCommand.ts @@ -501,6 +501,34 @@ export interface CreateIntentCommandOutput extends CreateIntentResponse, __Metad * }, * }, * }, + * qnAIntentConfiguration: { // QnAIntentConfiguration + * dataSourceConfiguration: { // DataSourceConfiguration + * opensearchConfiguration: { // OpensearchConfiguration + * domainEndpoint: "STRING_VALUE", // required + * indexName: "STRING_VALUE", // required + * exactResponse: true || false, + * exactResponseFields: { // ExactResponseFields + * questionField: "STRING_VALUE", // required + * answerField: "STRING_VALUE", // required + * }, + * includeFields: [ // OSIncludeFields + * "STRING_VALUE", + * ], + * }, + * kendraConfiguration: { // QnAKendraConfiguration + * kendraIndex: "STRING_VALUE", // required + * queryFilterStringEnabled: true || false, + * queryFilterString: "STRING_VALUE", + * exactResponse: true || false, + * }, + * bedrockKnowledgeStoreConfiguration: { // BedrockKnowledgeStoreConfiguration + * bedrockKnowledgeBaseArn: "STRING_VALUE", // required + * }, + * }, + * bedrockModelConfiguration: { // BedrockModelSpecification + * modelArn: "STRING_VALUE", // required + * }, + * }, * }; * const command = new CreateIntentCommand(input); * const response = await client.send(command); @@ -935,6 +963,34 @@ export interface CreateIntentCommandOutput extends CreateIntentResponse, __Metad * // }, * // }, * // }, + * // qnAIntentConfiguration: { // QnAIntentConfiguration + * // dataSourceConfiguration: { // DataSourceConfiguration + * // opensearchConfiguration: { // OpensearchConfiguration + * // domainEndpoint: "STRING_VALUE", // required + * // indexName: "STRING_VALUE", // required + * // exactResponse: true || false, + * // exactResponseFields: { // ExactResponseFields + * // questionField: "STRING_VALUE", // required + * // answerField: "STRING_VALUE", // required + * // }, + * // includeFields: [ // OSIncludeFields + * // "STRING_VALUE", + * // ], + * // }, + * // kendraConfiguration: { // QnAKendraConfiguration + * // kendraIndex: "STRING_VALUE", // required + * // queryFilterStringEnabled: true || false, + * // queryFilterString: "STRING_VALUE", + * // exactResponse: true || false, + * // }, + * // bedrockKnowledgeStoreConfiguration: { // BedrockKnowledgeStoreConfiguration + * // bedrockKnowledgeBaseArn: "STRING_VALUE", // required + * // }, + * // }, + * // bedrockModelConfiguration: { // BedrockModelSpecification + * // modelArn: "STRING_VALUE", // required + * // }, + * // }, * // }; * * ``` diff --git a/clients/client-lex-models-v2/src/commands/DescribeIntentCommand.ts b/clients/client-lex-models-v2/src/commands/DescribeIntentCommand.ts index ac6db36a0c49..eabf6ddeba99 100644 --- a/clients/client-lex-models-v2/src/commands/DescribeIntentCommand.ts +++ b/clients/client-lex-models-v2/src/commands/DescribeIntentCommand.ts @@ -481,6 +481,34 @@ export interface DescribeIntentCommandOutput extends DescribeIntentResponse, __M * // }, * // }, * // }, + * // qnAIntentConfiguration: { // QnAIntentConfiguration + * // dataSourceConfiguration: { // DataSourceConfiguration + * // opensearchConfiguration: { // OpensearchConfiguration + * // domainEndpoint: "STRING_VALUE", // required + * // indexName: "STRING_VALUE", // required + * // exactResponse: true || false, + * // exactResponseFields: { // ExactResponseFields + * // questionField: "STRING_VALUE", // required + * // answerField: "STRING_VALUE", // required + * // }, + * // includeFields: [ // OSIncludeFields + * // "STRING_VALUE", + * // ], + * // }, + * // kendraConfiguration: { // QnAKendraConfiguration + * // kendraIndex: "STRING_VALUE", // required + * // queryFilterStringEnabled: true || false, + * // queryFilterString: "STRING_VALUE", + * // exactResponse: true || false, + * // }, + * // bedrockKnowledgeStoreConfiguration: { // BedrockKnowledgeStoreConfiguration + * // bedrockKnowledgeBaseArn: "STRING_VALUE", // required + * // }, + * // }, + * // bedrockModelConfiguration: { // BedrockModelSpecification + * // modelArn: "STRING_VALUE", // required + * // }, + * // }, * // }; * * ``` diff --git a/clients/client-lex-models-v2/src/commands/UpdateIntentCommand.ts b/clients/client-lex-models-v2/src/commands/UpdateIntentCommand.ts index b608c8ca7cac..777c13c561f7 100644 --- a/clients/client-lex-models-v2/src/commands/UpdateIntentCommand.ts +++ b/clients/client-lex-models-v2/src/commands/UpdateIntentCommand.ts @@ -471,6 +471,34 @@ export interface UpdateIntentCommandOutput extends UpdateIntentResponse, __Metad * }, * }, * }, + * qnAIntentConfiguration: { // QnAIntentConfiguration + * dataSourceConfiguration: { // DataSourceConfiguration + * opensearchConfiguration: { // OpensearchConfiguration + * domainEndpoint: "STRING_VALUE", // required + * indexName: "STRING_VALUE", // required + * exactResponse: true || false, + * exactResponseFields: { // ExactResponseFields + * questionField: "STRING_VALUE", // required + * answerField: "STRING_VALUE", // required + * }, + * includeFields: [ // OSIncludeFields + * "STRING_VALUE", + * ], + * }, + * kendraConfiguration: { // QnAKendraConfiguration + * kendraIndex: "STRING_VALUE", // required + * queryFilterStringEnabled: true || false, + * queryFilterString: "STRING_VALUE", + * exactResponse: true || false, + * }, + * bedrockKnowledgeStoreConfiguration: { // BedrockKnowledgeStoreConfiguration + * bedrockKnowledgeBaseArn: "STRING_VALUE", // required + * }, + * }, + * bedrockModelConfiguration: { // BedrockModelSpecification + * modelArn: "STRING_VALUE", // required + * }, + * }, * }; * const command = new UpdateIntentCommand(input); * const response = await client.send(command); @@ -912,6 +940,34 @@ export interface UpdateIntentCommandOutput extends UpdateIntentResponse, __Metad * // }, * // }, * // }, + * // qnAIntentConfiguration: { // QnAIntentConfiguration + * // dataSourceConfiguration: { // DataSourceConfiguration + * // opensearchConfiguration: { // OpensearchConfiguration + * // domainEndpoint: "STRING_VALUE", // required + * // indexName: "STRING_VALUE", // required + * // exactResponse: true || false, + * // exactResponseFields: { // ExactResponseFields + * // questionField: "STRING_VALUE", // required + * // answerField: "STRING_VALUE", // required + * // }, + * // includeFields: [ // OSIncludeFields + * // "STRING_VALUE", + * // ], + * // }, + * // kendraConfiguration: { // QnAKendraConfiguration + * // kendraIndex: "STRING_VALUE", // required + * // queryFilterStringEnabled: true || false, + * // queryFilterString: "STRING_VALUE", + * // exactResponse: true || false, + * // }, + * // bedrockKnowledgeStoreConfiguration: { // BedrockKnowledgeStoreConfiguration + * // bedrockKnowledgeBaseArn: "STRING_VALUE", // required + * // }, + * // }, + * // bedrockModelConfiguration: { // BedrockModelSpecification + * // modelArn: "STRING_VALUE", // required + * // }, + * // }, * // }; * * ``` diff --git a/clients/client-lex-models-v2/src/models/models_0.ts b/clients/client-lex-models-v2/src/models/models_0.ts index ff83bdbbc880..d9315c54cfe4 100644 --- a/clients/client-lex-models-v2/src/models/models_0.ts +++ b/clients/client-lex-models-v2/src/models/models_0.ts @@ -2937,6 +2937,18 @@ export interface BatchUpdateCustomVocabularyItemResponse { resources?: CustomVocabularyItem[]; } +/** + * @public + *

Contains details about the configuration of a Amazon Bedrock knowledge base.

+ */ +export interface BedrockKnowledgeStoreConfiguration { + /** + * @public + *

The ARN of the knowledge base used.

+ */ + bedrockKnowledgeBaseArn: string | undefined; +} + /** * @public *

Contains information about the Amazon Bedrock model used to interpret the prompt used in descriptive bot building.

@@ -6148,6 +6160,132 @@ export interface OutputContext { turnsToLive: number | undefined; } +/** + * @public + *

Contains details about the configuration of the Amazon Kendra index used for the AMAZON.QnAIntent.

+ */ +export interface QnAKendraConfiguration { + /** + * @public + *

The ARN of the Amazon Kendra index to use.

+ */ + kendraIndex: string | undefined; + + /** + * @public + *

Specifies whether to enable an Amazon Kendra filter string or not.

+ */ + queryFilterStringEnabled?: boolean; + + /** + * @public + *

Contains the Amazon Kendra filter string to use if enabled. For more information on the Amazon Kendra search filter JSON format, see Using document attributes to filter search results.

+ */ + queryFilterString?: string; + + /** + * @public + *

Specifies whether to return an exact response from the Amazon Kendra index or to let the Amazon Bedrock model you select generate a response based on the results. To use this feature, you must first add FAQ questions to your index by following the steps at Adding frequently asked questions (FAQs) to an index.

+ */ + exactResponse?: boolean; +} + +/** + * @public + *

Contains the names of the fields used for an exact response to the user.

+ */ +export interface ExactResponseFields { + /** + * @public + *

The name of the field that contains the query made to the OpenSearch Service database.

+ */ + questionField: string | undefined; + + /** + * @public + *

The name of the field that contains the answer to the query made to the OpenSearch Service database.

+ */ + answerField: string | undefined; +} + +/** + * @public + *

Contains details about the configuration of the Amazon OpenSearch Service database used for the AMAZON.QnAIntent.

+ */ +export interface OpensearchConfiguration { + /** + * @public + *

The endpoint of the Amazon OpenSearch Service domain.

+ */ + domainEndpoint: string | undefined; + + /** + * @public + *

The name of the Amazon OpenSearch Service index.

+ */ + indexName: string | undefined; + + /** + * @public + *

Specifies whether to return an exact response or to return an answer generated by the model using the fields you specify from the database.

+ */ + exactResponse?: boolean; + + /** + * @public + *

Contains the names of the fields used for an exact response to the user.

+ */ + exactResponseFields?: ExactResponseFields; + + /** + * @public + *

Contains a list of fields from the Amazon OpenSearch Service that the model can use to generate the answer to the query.

+ */ + includeFields?: string[]; +} + +/** + * @public + *

Contains details about the configuration of the knowledge store used for the AMAZON.QnAIntent. You must have already created the knowledge store and indexed the documents within it.

+ */ +export interface DataSourceConfiguration { + /** + * @public + *

Contains details about the configuration of the Amazon OpenSearch Service database used for the AMAZON.QnAIntent. To create a domain, follow the steps at Creating and managing Amazon OpenSearch Service domains.

+ */ + opensearchConfiguration?: OpensearchConfiguration; + + /** + * @public + *

Contains details about the configuration of the Amazon Kendra index used for the AMAZON.QnAIntent. To create a Amazon Kendra index, follow the steps at Creating an index.

+ */ + kendraConfiguration?: QnAKendraConfiguration; + + /** + * @public + *

Contains details about the configuration of the Amazon Bedrock knowledge base used for the AMAZON.QnAIntent. To set up a knowledge base, follow the steps at Building a knowledge base.

+ */ + bedrockKnowledgeStoreConfiguration?: BedrockKnowledgeStoreConfiguration; +} + +/** + * @public + *

Details about the the configuration of the built-in Amazon.QnAIntent.

+ */ +export interface QnAIntentConfiguration { + /** + * @public + *

Contains details about the configuration of the data source used for the AMAZON.QnAIntent.

+ */ + dataSourceConfiguration?: DataSourceConfiguration; + + /** + * @public + *

Contains information about the Amazon Bedrock model used to interpret the prompt used in descriptive bot building.

+ */ + bedrockModelConfiguration?: BedrockModelSpecification; +} + /** * @public *

A sample utterance that invokes an intent or respond to a slot @@ -8169,127 +8307,6 @@ export interface EncryptionSetting { associatedTranscriptsPassword?: string; } -/** - * @public - *

The object that contains a path format that will be applied when - * Amazon Lex reads the transcript file in the bucket you provide. Specify this - * object if you only want Lex to read a subset of files in your Amazon S3 - * bucket.

- */ -export interface PathFormat { - /** - * @public - *

A list of Amazon S3 prefixes that points to sub-folders in the Amazon S3 - * bucket. Specify this list if you only want Lex to read the files under - * this set of sub-folders.

- */ - objectPrefixes?: string[]; -} - -/** - * @public - *

The object that contains transcript filter details that are - * associated with a bot recommendation.

- */ -export interface LexTranscriptFilter { - /** - * @public - *

The object that contains a date range filter that will be applied to - * the transcript. Specify this object if you want Amazon Lex to only read the - * files that are within the date range.

- */ - dateRangeFilter?: DateRangeFilter; -} - -/** - * @public - *

The object representing the filter that Amazon Lex will use to select the - * appropriate transcript.

- */ -export interface TranscriptFilter { - /** - * @public - *

The object representing the filter that Amazon Lex will use to select the - * appropriate transcript when the transcript format is the Amazon Lex - * format.

- */ - lexTranscriptFilter?: LexTranscriptFilter; -} - -/** - * @public - * @enum - */ -export const TranscriptFormat = { - Lex: "Lex", -} as const; - -/** - * @public - */ -export type TranscriptFormat = (typeof TranscriptFormat)[keyof typeof TranscriptFormat]; - -/** - * @public - *

The object representing the Amazon S3 bucket containing the transcript, - * as well as the associated metadata.

- */ -export interface S3BucketTranscriptSource { - /** - * @public - *

The name of the bucket containing the transcript and the associated - * metadata.

- */ - s3BucketName: string | undefined; - - /** - * @public - *

The object that contains a path format that will be applied when - * Amazon Lex reads the transcript file in the bucket you provide. Specify this - * object if you only want Lex to read a subset of files in your Amazon S3 - * bucket.

- */ - pathFormat?: PathFormat; - - /** - * @public - *

The format of the transcript content. Currently, Genie only supports - * the Amazon Lex transcript format.

- */ - transcriptFormat: TranscriptFormat | undefined; - - /** - * @public - *

The object that contains the filter which will be applied when Amazon Lex - * reads through the Amazon S3 bucket. Specify this object if you want Amazon Lex to - * read only a subset of the Amazon S3 bucket based on the filter you - * provide.

- */ - transcriptFilter?: TranscriptFilter; - - /** - * @public - *

The ARN of the KMS key that customer use to encrypt their Amazon S3 - * bucket. Only use this field if your bucket is encrypted using a - * customer managed KMS key.

- */ - kmsKeyArn?: string; -} - -/** - * @public - *

Indicates the setting of the location where the transcript is - * stored.

- */ -export interface TranscriptSourceSetting { - /** - * @public - *

Indicates the setting of the Amazon S3 bucket where the transcript is - * stored.

- */ - s3BucketTranscriptSource?: S3BucketTranscriptSource; -} - /** * @internal */ diff --git a/clients/client-lex-models-v2/src/models/models_1.ts b/clients/client-lex-models-v2/src/models/models_1.ts index 4d0147e5ff23..dd1de0cfe940 100644 --- a/clients/client-lex-models-v2/src/models/models_1.ts +++ b/clients/client-lex-models-v2/src/models/models_1.ts @@ -76,6 +76,7 @@ import { CustomVocabularyItem, CustomVocabularyStatus, DataPrivacy, + DateRangeFilter, DialogAction, DialogCodeHookSettings, ElicitationCodeHookInvocationSetting, @@ -97,6 +98,7 @@ import { OutputContext, ParentBotNetwork, PromptSpecification, + QnAIntentConfiguration, ResponseSpecification, SampleUtterance, SentimentAnalysisSettings, @@ -111,11 +113,131 @@ import { SubSlotSetting, TestResultMatchStatus, TestSetDiscrepancyReportResourceTarget, - TranscriptSourceSetting, VoiceSettings, WaitAndContinueSpecification, } from "./models_0"; +/** + * @public + *

The object that contains a path format that will be applied when + * Amazon Lex reads the transcript file in the bucket you provide. Specify this + * object if you only want Lex to read a subset of files in your Amazon S3 + * bucket.

+ */ +export interface PathFormat { + /** + * @public + *

A list of Amazon S3 prefixes that points to sub-folders in the Amazon S3 + * bucket. Specify this list if you only want Lex to read the files under + * this set of sub-folders.

+ */ + objectPrefixes?: string[]; +} + +/** + * @public + *

The object that contains transcript filter details that are + * associated with a bot recommendation.

+ */ +export interface LexTranscriptFilter { + /** + * @public + *

The object that contains a date range filter that will be applied to + * the transcript. Specify this object if you want Amazon Lex to only read the + * files that are within the date range.

+ */ + dateRangeFilter?: DateRangeFilter; +} + +/** + * @public + *

The object representing the filter that Amazon Lex will use to select the + * appropriate transcript.

+ */ +export interface TranscriptFilter { + /** + * @public + *

The object representing the filter that Amazon Lex will use to select the + * appropriate transcript when the transcript format is the Amazon Lex + * format.

+ */ + lexTranscriptFilter?: LexTranscriptFilter; +} + +/** + * @public + * @enum + */ +export const TranscriptFormat = { + Lex: "Lex", +} as const; + +/** + * @public + */ +export type TranscriptFormat = (typeof TranscriptFormat)[keyof typeof TranscriptFormat]; + +/** + * @public + *

The object representing the Amazon S3 bucket containing the transcript, + * as well as the associated metadata.

+ */ +export interface S3BucketTranscriptSource { + /** + * @public + *

The name of the bucket containing the transcript and the associated + * metadata.

+ */ + s3BucketName: string | undefined; + + /** + * @public + *

The object that contains a path format that will be applied when + * Amazon Lex reads the transcript file in the bucket you provide. Specify this + * object if you only want Lex to read a subset of files in your Amazon S3 + * bucket.

+ */ + pathFormat?: PathFormat; + + /** + * @public + *

The format of the transcript content. Currently, Genie only supports + * the Amazon Lex transcript format.

+ */ + transcriptFormat: TranscriptFormat | undefined; + + /** + * @public + *

The object that contains the filter which will be applied when Amazon Lex + * reads through the Amazon S3 bucket. Specify this object if you want Amazon Lex to + * read only a subset of the Amazon S3 bucket based on the filter you + * provide.

+ */ + transcriptFilter?: TranscriptFilter; + + /** + * @public + *

The ARN of the KMS key that customer use to encrypt their Amazon S3 + * bucket. Only use this field if your bucket is encrypted using a + * customer managed KMS key.

+ */ + kmsKeyArn?: string; +} + +/** + * @public + *

Indicates the setting of the location where the transcript is + * stored.

+ */ +export interface TranscriptSourceSetting { + /** + * @public + *

Indicates the setting of the Amazon S3 bucket where the transcript is + * stored.

+ */ + s3BucketTranscriptSource?: S3BucketTranscriptSource; +} + /** * @public */ @@ -9300,6 +9422,13 @@ export interface CreateIntentRequest { * the beginning of a conversation, before eliciting slot values.

*/ initialResponseSetting?: InitialResponseSetting; + + /** + * @public + *

Specifies the configuration of the built-in Amazon.QnAIntent. The AMAZON.QnAIntent intent is called when + * Amazon Lex can't determine another intent to invoke. If you specify this field, you can't specify the kendraConfiguration field.

+ */ + qnAIntentConfiguration?: QnAIntentConfiguration; } /** @@ -9410,6 +9539,12 @@ export interface CreateIntentResponse { * the beginning of a conversation, before eliciting slot values.

*/ initialResponseSetting?: InitialResponseSetting; + + /** + * @public + *

Details about the the configuration of the built-in Amazon.QnAIntent.

+ */ + qnAIntentConfiguration?: QnAIntentConfiguration; } /** @@ -9539,6 +9674,12 @@ export interface DescribeIntentResponse { *

Configuration setting for a response sent to the user before Amazon Lex starts eliciting slots.

*/ initialResponseSetting?: InitialResponseSetting; + + /** + * @public + *

Details about the configuration of the built-in Amazon.QnAIntent.

+ */ + qnAIntentConfiguration?: QnAIntentConfiguration; } /** @@ -9657,6 +9798,13 @@ export interface UpdateIntentRequest { *

Configuration settings for a response sent to the user before Amazon Lex starts eliciting slots.

*/ initialResponseSetting?: InitialResponseSetting; + + /** + * @public + *

Specifies the configuration of the built-in Amazon.QnAIntent. The AMAZON.QnAIntent intent is called when + * Amazon Lex can't determine another intent to invoke. If you specify this field, you can't specify the kendraConfiguration field.

+ */ + qnAIntentConfiguration?: QnAIntentConfiguration; } /** @@ -9786,6 +9934,12 @@ export interface UpdateIntentResponse { *

Configuration settings for a response sent to the user before Amazon Lex starts eliciting slots.

*/ initialResponseSetting?: InitialResponseSetting; + + /** + * @public + *

Details about the configuration of the built-in Amazon.QnAIntent.

+ */ + qnAIntentConfiguration?: QnAIntentConfiguration; } /** diff --git a/clients/client-lex-models-v2/src/protocols/Aws_restJson1.ts b/clients/client-lex-models-v2/src/protocols/Aws_restJson1.ts index bb612efe87d5..0dbc6dd048cf 100644 --- a/clients/client-lex-models-v2/src/protocols/Aws_restJson1.ts +++ b/clients/client-lex-models-v2/src/protocols/Aws_restJson1.ts @@ -279,6 +279,7 @@ import { AudioLogDestination, AudioLogSetting, AudioSpecification, + BedrockKnowledgeStoreConfiguration, BedrockModelSpecification, BotAliasHistoryEvent, BotAliasLocaleSettings, @@ -323,6 +324,7 @@ import { CustomVocabularyImportSpecification, CustomVocabularyItem, DataPrivacy, + DataSourceConfiguration, DateRangeFilter, DescriptiveBotBuilderSpecification, DialogAction, @@ -330,6 +332,7 @@ import { DTMFSpecification, ElicitationCodeHookInvocationSetting, EncryptionSetting, + ExactResponseFields, ExportResourceSpecification, ExternalSourceSetting, FulfillmentStartResponseSpecification, @@ -343,25 +346,25 @@ import { InternalServerException, KendraConfiguration, LambdaCodeHook, - LexTranscriptFilter, Message, MessageGroup, MultipleValuesSetting, NewCustomVocabularyItem, ObfuscationSetting, + OpensearchConfiguration, OutputContext, - PathFormat, PlainTextMessage, PreconditionFailedException, Principal, PromptAttempt, PromptAttemptSpecification, PromptSpecification, + QnAIntentConfiguration, + QnAKendraConfiguration, ResourceNotFoundException, ResponseSpecification, RuntimeSettings, S3BucketLogDestination, - S3BucketTranscriptSource, SampleUtterance, SampleUtteranceGenerationSpecification, SampleValue, @@ -388,8 +391,6 @@ import { TextLogDestination, TextLogSetting, ThrottlingException, - TranscriptFilter, - TranscriptSourceSetting, ValidationException, VoiceSettings, WaitAndContinueSpecification, @@ -418,11 +419,14 @@ import { IntentOverride, IntentSortBy, IntentSummary, + LexTranscriptFilter, + PathFormat, PostDialogCodeHookInvocationSpecification, PostFulfillmentStatusSpecification, RelativeAggregationDuration, RuntimeHintDetails, RuntimeHints, + S3BucketTranscriptSource, SessionDataSortBy, SessionSpecification, SlotCaptureSetting, @@ -448,6 +452,8 @@ import { TestSetSummary, TestSetTurnRecord, TestSetTurnResult, + TranscriptFilter, + TranscriptSourceSetting, TurnSpecification, UserTurnInputSpecification, UserTurnIntentOutput, @@ -742,6 +748,7 @@ export const se_CreateIntentCommand = async ( kendraConfiguration: (_) => _json(_), outputContexts: (_) => _json(_), parentIntentSignature: [], + qnAIntentConfiguration: (_) => _json(_), sampleUtterances: (_) => _json(_), }) ); @@ -2739,6 +2746,7 @@ export const se_UpdateIntentCommand = async ( kendraConfiguration: (_) => _json(_), outputContexts: (_) => _json(_), parentIntentSignature: [], + qnAIntentConfiguration: (_) => _json(_), sampleUtterances: (_) => _json(_), slotPriorities: (_) => _json(_), }) @@ -3162,6 +3170,7 @@ export const de_CreateIntentCommand = async ( localeId: __expectString, outputContexts: _json, parentIntentSignature: __expectString, + qnAIntentConfiguration: _json, sampleUtterances: _json, }); Object.assign(contents, doc); @@ -3973,6 +3982,7 @@ export const de_DescribeIntentCommand = async ( localeId: __expectString, outputContexts: _json, parentIntentSignature: __expectString, + qnAIntentConfiguration: _json, sampleUtterances: _json, slotPriorities: _json, }); @@ -5376,6 +5386,7 @@ export const de_UpdateIntentCommand = async ( localeId: __expectString, outputContexts: _json, parentIntentSignature: __expectString, + qnAIntentConfiguration: _json, sampleUtterances: _json, slotPriorities: _json, }); @@ -5763,6 +5774,8 @@ const de_ValidationExceptionRes = async (parsedOutput: any, context: __SerdeCont // se_AudioSpecification omitted. +// se_BedrockKnowledgeStoreConfiguration omitted. + // se_BedrockModelSpecification omitted. // se_BotAliasLocaleSettings omitted. @@ -5914,6 +5927,8 @@ const se_ConversationLogsDataSourceFilterBy = ( // se_DataPrivacy omitted. +// se_DataSourceConfiguration omitted. + /** * serializeAws_restJson1DateRangeFilter */ @@ -5971,6 +5986,8 @@ const se_DialogState = (input: DialogState, context: __SerdeContext): any => { // se_EncryptionSetting omitted. +// se_ExactResponseFields omitted. + // se_ExportFilter omitted. // se_ExportFilters omitted. @@ -6123,8 +6140,12 @@ const se_LexTranscriptFilter = (input: LexTranscriptFilter, context: __SerdeCont // se_ObjectPrefixes omitted. +// se_OpensearchConfiguration omitted. + // se_OperationList omitted. +// se_OSIncludeFields omitted. + // se_OutputContext omitted. // se_OutputContextsList omitted. @@ -6183,6 +6204,10 @@ const se_PostFulfillmentStatusSpecification = ( // se_PromptSpecification omitted. +// se_QnAIntentConfiguration omitted. + +// se_QnAKendraConfiguration omitted. + // se_RelativeAggregationDuration omitted. // se_ResponseSpecification omitted. @@ -6703,6 +6728,8 @@ const de_AnalyticsUtteranceResults = (output: any, context: __SerdeContext): Ana // de_AudioSpecification omitted. +// de_BedrockKnowledgeStoreConfiguration omitted. + // de_BedrockModelSpecification omitted. /** @@ -7103,6 +7130,8 @@ const de_ConversationLogsDataSourceFilterBy = ( // de_DataPrivacy omitted. +// de_DataSourceConfiguration omitted. + /** * deserializeAws_restJson1DateRangeFilter */ @@ -7158,6 +7187,8 @@ const de_DialogState = (output: any, context: __SerdeContext): DialogState => { // de_EncryptionSetting omitted. +// de_ExactResponseFields omitted. + // de_ExecutionErrorDetails omitted. // de_ExportResourceSpecification omitted. @@ -7430,6 +7461,10 @@ const de_LexTranscriptFilter = (output: any, context: __SerdeContext): LexTransc // de_ObjectPrefixes omitted. +// de_OpensearchConfiguration omitted. + +// de_OSIncludeFields omitted. + // de_OutputContext omitted. // de_OutputContextsList omitted. @@ -7494,6 +7529,10 @@ const de_PostFulfillmentStatusSpecification = ( // de_PromptSpecification omitted. +// de_QnAIntentConfiguration omitted. + +// de_QnAKendraConfiguration omitted. + // de_RecommendedActions omitted. // de_RecommendedIntentSummary omitted. diff --git a/codegen/sdk-codegen/aws-models/lex-models-v2.json b/codegen/sdk-codegen/aws-models/lex-models-v2.json index 827fafa2c0ea..71d919449eb1 100644 --- a/codegen/sdk-codegen/aws-models/lex-models-v2.json +++ b/codegen/sdk-codegen/aws-models/lex-models-v2.json @@ -2079,6 +2079,9 @@ } } }, + "com.amazonaws.lexmodelsv2#AnswerField": { + "type": "string" + }, "com.amazonaws.lexmodelsv2#AssociatedTranscript": { "type": "structure", "members": { @@ -2626,10 +2629,35 @@ "smithy.api#output": {} } }, + "com.amazonaws.lexmodelsv2#BedrockKnowledgeBaseArn": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 200 + }, + "smithy.api#pattern": "^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,40}:[0-9]{12}:knowledge-base\\/[A-Za-z0-9]{10}$|^[A-Za-z0-9]{10}$" + } + }, + "com.amazonaws.lexmodelsv2#BedrockKnowledgeStoreConfiguration": { + "type": "structure", + "members": { + "bedrockKnowledgeBaseArn": { + "target": "com.amazonaws.lexmodelsv2#BedrockKnowledgeBaseArn", + "traits": { + "smithy.api#documentation": "

The ARN of the knowledge base used.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains details about the configuration of a Amazon Bedrock knowledge base.

" + } + }, "com.amazonaws.lexmodelsv2#BedrockModelArn": { "type": "string", "traits": { - "smithy.api#pattern": "^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}::foundation-model\\/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}$" + "smithy.api#pattern": "^arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}::foundation-model\\/[a-z0-9-]{1,63}[.]{1}([a-z0-9-]{1,63}[.]){0,2}[a-z0-9-]{1,63}([:][a-z0-9-]{1,63}){0,2}$" } }, "com.amazonaws.lexmodelsv2#BedrockModelSpecification": { @@ -4169,7 +4197,10 @@ } }, "sampleUtteranceGeneration": { - "target": "com.amazonaws.lexmodelsv2#SampleUtteranceGenerationSpecification" + "target": "com.amazonaws.lexmodelsv2#SampleUtteranceGenerationSpecification", + "traits": { + "smithy.api#documentation": "

Contains specifications for the sample utterance generation feature.

" + } } }, "traits": { @@ -5883,6 +5914,12 @@ "traits": { "smithy.api#documentation": "

Configuration settings for the response that is sent to the user at\n the beginning of a conversation, before eliciting slot values.

" } + }, + "qnAIntentConfiguration": { + "target": "com.amazonaws.lexmodelsv2#QnAIntentConfiguration", + "traits": { + "smithy.api#documentation": "

Specifies the configuration of the built-in Amazon.QnAIntent. The AMAZON.QnAIntent intent is called when\n Amazon Lex can't determine another intent to invoke. If you specify this field, you can't specify the kendraConfiguration field.

" + } } }, "traits": { @@ -5993,6 +6030,12 @@ "traits": { "smithy.api#documentation": "

Configuration settings for the response that is sent to the user at\n the beginning of a conversation, before eliciting slot values.

" } + }, + "qnAIntentConfiguration": { + "target": "com.amazonaws.lexmodelsv2#QnAIntentConfiguration", + "traits": { + "smithy.api#documentation": "

Details about the the configuration of the built-in Amazon.QnAIntent.

" + } } }, "traits": { @@ -6978,6 +7021,32 @@ "smithy.api#documentation": "

By default, data stored by Amazon Lex is encrypted. The\n DataPrivacy structure provides settings that determine\n how Amazon Lex handles special cases of securing the data for your bot.\n

" } }, + "com.amazonaws.lexmodelsv2#DataSourceConfiguration": { + "type": "structure", + "members": { + "opensearchConfiguration": { + "target": "com.amazonaws.lexmodelsv2#OpensearchConfiguration", + "traits": { + "smithy.api#documentation": "

Contains details about the configuration of the Amazon OpenSearch Service database used for the AMAZON.QnAIntent. To create a domain, follow the steps at Creating and managing Amazon OpenSearch Service domains.

" + } + }, + "kendraConfiguration": { + "target": "com.amazonaws.lexmodelsv2#QnAKendraConfiguration", + "traits": { + "smithy.api#documentation": "

Contains details about the configuration of the Amazon Kendra index used for the AMAZON.QnAIntent. To create a Amazon Kendra index, follow the steps at Creating an index.

" + } + }, + "bedrockKnowledgeStoreConfiguration": { + "target": "com.amazonaws.lexmodelsv2#BedrockKnowledgeStoreConfiguration", + "traits": { + "smithy.api#documentation": "

Contains details about the configuration of the Amazon Bedrock knowledge base used for the AMAZON.QnAIntent. To set up a knowledge base, follow the steps at Building a knowledge base.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains details about the configuration of the knowledge store used for the AMAZON.QnAIntent. You must have already created the knowledge store and indexed the documents within it.

" + } + }, "com.amazonaws.lexmodelsv2#DateRangeFilter": { "type": "structure", "members": { @@ -10112,6 +10181,12 @@ "traits": { "smithy.api#documentation": "

Configuration setting for a response sent to the user before Amazon Lex starts eliciting slots.

" } + }, + "qnAIntentConfiguration": { + "target": "com.amazonaws.lexmodelsv2#QnAIntentConfiguration", + "traits": { + "smithy.api#documentation": "

Details about the configuration of the built-in Amazon.QnAIntent.

" + } } }, "traits": { @@ -11179,6 +11254,12 @@ "smithy.api#documentation": "

The current state of the conversation with the user.

" } }, + "com.amazonaws.lexmodelsv2#DomainEndpoint": { + "type": "string", + "traits": { + "smithy.api#pattern": "^(http|https):\\/\\/+[^\\s]+[\\w]$" + } + }, "com.amazonaws.lexmodelsv2#DraftBotVersion": { "type": "string", "traits": { @@ -11291,6 +11372,28 @@ "com.amazonaws.lexmodelsv2#ErrorMessage": { "type": "string" }, + "com.amazonaws.lexmodelsv2#ExactResponseFields": { + "type": "structure", + "members": { + "questionField": { + "target": "com.amazonaws.lexmodelsv2#QuestionField", + "traits": { + "smithy.api#documentation": "

The name of the field that contains the query made to the OpenSearch Service database.

", + "smithy.api#required": {} + } + }, + "answerField": { + "target": "com.amazonaws.lexmodelsv2#AnswerField", + "traits": { + "smithy.api#documentation": "

The name of the field that contains the answer to the query made to the OpenSearch Service database.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains the names of the fields used for an exact response to the user.

" + } + }, "com.amazonaws.lexmodelsv2#ExceptionMessage": { "type": "string" }, @@ -12458,6 +12561,9 @@ "smithy.api#pattern": "^([0-9a-zA-Z_])+$" } }, + "com.amazonaws.lexmodelsv2#IncludeField": { + "type": "string" + }, "com.amazonaws.lexmodelsv2#InitialResponseSetting": { "type": "structure", "members": { @@ -17937,6 +18043,28 @@ "smithy.api#pattern": "^[0-9]+$" } }, + "com.amazonaws.lexmodelsv2#OSIncludeFields": { + "type": "list", + "member": { + "target": "com.amazonaws.lexmodelsv2#IncludeField" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 5 + } + } + }, + "com.amazonaws.lexmodelsv2#OSIndexName": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 255 + }, + "smithy.api#pattern": "^(?![_-])[a-z0-9][a-z0-9_\\-]{0,254}$" + } + }, "com.amazonaws.lexmodelsv2#ObfuscationSetting": { "type": "structure", "members": { @@ -17990,6 +18118,47 @@ } } }, + "com.amazonaws.lexmodelsv2#OpensearchConfiguration": { + "type": "structure", + "members": { + "domainEndpoint": { + "target": "com.amazonaws.lexmodelsv2#DomainEndpoint", + "traits": { + "smithy.api#documentation": "

The endpoint of the Amazon OpenSearch Service domain.

", + "smithy.api#required": {} + } + }, + "indexName": { + "target": "com.amazonaws.lexmodelsv2#OSIndexName", + "traits": { + "smithy.api#documentation": "

The name of the Amazon OpenSearch Service index.

", + "smithy.api#required": {} + } + }, + "exactResponse": { + "target": "com.amazonaws.lexmodelsv2#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Specifies whether to return an exact response or to return an answer generated by the model using the fields you specify from the database.

" + } + }, + "exactResponseFields": { + "target": "com.amazonaws.lexmodelsv2#ExactResponseFields", + "traits": { + "smithy.api#documentation": "

Contains the names of the fields used for an exact response to the user.

" + } + }, + "includeFields": { + "target": "com.amazonaws.lexmodelsv2#OSIncludeFields", + "traits": { + "smithy.api#documentation": "

Contains a list of fields from the Amazon OpenSearch Service that the model can use to generate the answer to the query.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains details about the configuration of the Amazon OpenSearch Service database used for the AMAZON.QnAIntent.

" + } + }, "com.amazonaws.lexmodelsv2#Operation": { "type": "string", "traits": { @@ -18501,6 +18670,58 @@ "smithy.api#documentation": "

Specifies a list of message groups that Amazon Lex sends to a user to\n elicit a response.

" } }, + "com.amazonaws.lexmodelsv2#QnAIntentConfiguration": { + "type": "structure", + "members": { + "dataSourceConfiguration": { + "target": "com.amazonaws.lexmodelsv2#DataSourceConfiguration", + "traits": { + "smithy.api#documentation": "

Contains details about the configuration of the data source used for the AMAZON.QnAIntent.

" + } + }, + "bedrockModelConfiguration": { + "target": "com.amazonaws.lexmodelsv2#BedrockModelSpecification" + } + }, + "traits": { + "smithy.api#documentation": "

Details about the the configuration of the built-in Amazon.QnAIntent.

" + } + }, + "com.amazonaws.lexmodelsv2#QnAKendraConfiguration": { + "type": "structure", + "members": { + "kendraIndex": { + "target": "com.amazonaws.lexmodelsv2#KendraIndexArn", + "traits": { + "smithy.api#documentation": "

The ARN of the Amazon Kendra index to use.

", + "smithy.api#required": {} + } + }, + "queryFilterStringEnabled": { + "target": "com.amazonaws.lexmodelsv2#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Specifies whether to enable an Amazon Kendra filter string or not.

" + } + }, + "queryFilterString": { + "target": "com.amazonaws.lexmodelsv2#QueryFilterString", + "traits": { + "smithy.api#documentation": "

Contains the Amazon Kendra filter string to use if enabled. For more information on the Amazon Kendra search filter JSON format, see Using document attributes to filter search results.

" + } + }, + "exactResponse": { + "target": "com.amazonaws.lexmodelsv2#Boolean", + "traits": { + "smithy.api#default": false, + "smithy.api#documentation": "

Specifies whether to return an exact response from the Amazon Kendra index or to let the Amazon Bedrock model you select generate a response based on the results. To use this feature, you must first add FAQ questions to your index by following the steps at Adding frequently asked questions (FAQs) to an index.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains details about the configuration of the Amazon Kendra index used for the AMAZON.QnAIntent.

" + } + }, "com.amazonaws.lexmodelsv2#QueryFilterString": { "type": "string", "traits": { @@ -18510,6 +18731,9 @@ } } }, + "com.amazonaws.lexmodelsv2#QuestionField": { + "type": "string" + }, "com.amazonaws.lexmodelsv2#RecommendedAction": { "type": "string" }, @@ -23337,6 +23561,12 @@ "traits": { "smithy.api#documentation": "

Configuration settings for a response sent to the user before Amazon Lex starts eliciting slots.

" } + }, + "qnAIntentConfiguration": { + "target": "com.amazonaws.lexmodelsv2#QnAIntentConfiguration", + "traits": { + "smithy.api#documentation": "

Specifies the configuration of the built-in Amazon.QnAIntent. The AMAZON.QnAIntent intent is called when\n Amazon Lex can't determine another intent to invoke. If you specify this field, you can't specify the kendraConfiguration field.

" + } } }, "traits": { @@ -23459,6 +23689,12 @@ "traits": { "smithy.api#documentation": "

Configuration settings for a response sent to the user before Amazon Lex starts eliciting slots.

" } + }, + "qnAIntentConfiguration": { + "target": "com.amazonaws.lexmodelsv2#QnAIntentConfiguration", + "traits": { + "smithy.api#documentation": "

Details about the configuration of the built-in Amazon.QnAIntent.

" + } } }, "traits": {