LexModelsV2 / Client / update_bot_locale

update_bot_locale#

LexModelsV2.Client.update_bot_locale(**kwargs)#

Updates the settings that a bot has for a specific locale.

See also: AWS API Documentation

Request Syntax

response = client.update_bot_locale(
    botId='string',
    botVersion='string',
    localeId='string',
    description='string',
    nluIntentConfidenceThreshold=123.0,
    voiceSettings={
        'voiceId': 'string',
        'engine': 'standard'|'neural'
    },
    generativeAISettings={
        'runtimeSettings': {
            'slotResolutionImprovement': {
                'enabled': True|False,
                'bedrockModelSpecification': {
                    'modelArn': 'string',
                    'guardrail': {
                        'identifier': 'string',
                        'version': 'string'
                    },
                    'traceStatus': 'ENABLED'|'DISABLED',
                    'customPrompt': 'string'
                }
            }
        },
        'buildtimeSettings': {
            'descriptiveBotBuilder': {
                'enabled': True|False,
                'bedrockModelSpecification': {
                    'modelArn': 'string',
                    'guardrail': {
                        'identifier': 'string',
                        'version': 'string'
                    },
                    'traceStatus': 'ENABLED'|'DISABLED',
                    'customPrompt': 'string'
                }
            },
            'sampleUtteranceGeneration': {
                'enabled': True|False,
                'bedrockModelSpecification': {
                    'modelArn': 'string',
                    'guardrail': {
                        'identifier': 'string',
                        'version': 'string'
                    },
                    'traceStatus': 'ENABLED'|'DISABLED',
                    'customPrompt': 'string'
                }
            }
        }
    }
)
Parameters:
  • botId (string) –

    [REQUIRED]

    The unique identifier of the bot that contains the locale.

  • botVersion (string) –

    [REQUIRED]

    The version of the bot that contains the locale to be updated. The version can only be the DRAFT version.

  • localeId (string) –

    [REQUIRED]

    The identifier of the language and locale to update. The string must match one of the supported locales. For more information, see Supported languages.

  • description (string) – The new description of the locale.

  • nluIntentConfidenceThreshold (float) –

    [REQUIRED]

    The new confidence threshold where Amazon Lex inserts the AMAZON.FallbackIntent and AMAZON.KendraSearchIntent intents in the list of possible intents for an utterance.

  • voiceSettings (dict) –

    The new Amazon Polly voice Amazon Lex should use for voice interaction with the user.

    • voiceId (string) – [REQUIRED]

      The identifier of the Amazon Polly voice to use.

    • engine (string) –

      Indicates the type of Amazon Polly voice that Amazon Lex should use for voice interaction with the user. For more information, see the engine parameter of the SynthesizeSpeech operation in the Amazon Polly developer guide.

      If you do not specify a value, the default is standard.

  • generativeAISettings (dict) –

    Contains settings for generative AI features powered by Amazon Bedrock for your bot locale. Use this object to turn generative AI features on and off. Pricing may differ if you turn a feature on. For more information, see LINK.

    • runtimeSettings (dict) –

      Contains specifications about the Amazon Lex runtime generative AI capabilities from Amazon Bedrock that you can turn on for your bot.

      • slotResolutionImprovement (dict) –

        An object containing specifications for the assisted slot resolution feature.

        • enabled (boolean) – [REQUIRED]

          Specifies whether assisted slot resolution is turned on or off.

        • bedrockModelSpecification (dict) –

          An object containing information about the Amazon Bedrock model used to assist slot resolution.

          • modelArn (string) – [REQUIRED]

            The ARN of the foundation model used in descriptive bot building.

          • guardrail (dict) –

            The guardrail configuration in the Bedrock model specification details.

            • identifier (string) – [REQUIRED]

              The unique guardrail id for the Bedrock guardrail configuration.

            • version (string) – [REQUIRED]

              The guardrail version for the Bedrock guardrail configuration.

          • traceStatus (string) –

            The Bedrock trace status in the Bedrock model specification details.

          • customPrompt (string) –

            The custom prompt used in the Bedrock model specification details.

    • buildtimeSettings (dict) –

      Contains specifications about the Amazon Lex build time generative AI capabilities from Amazon Bedrock that you can turn on for your bot.

      • descriptiveBotBuilder (dict) –

        An object containing specifications for the descriptive bot building feature.

        • enabled (boolean) – [REQUIRED]

          Specifies whether the descriptive bot building feature is activated or not.

        • bedrockModelSpecification (dict) –

          An object containing information about the Amazon Bedrock model used to interpret the prompt used in descriptive bot building.

          • modelArn (string) – [REQUIRED]

            The ARN of the foundation model used in descriptive bot building.

          • guardrail (dict) –

            The guardrail configuration in the Bedrock model specification details.

            • identifier (string) – [REQUIRED]

              The unique guardrail id for the Bedrock guardrail configuration.

            • version (string) – [REQUIRED]

              The guardrail version for the Bedrock guardrail configuration.

          • traceStatus (string) –

            The Bedrock trace status in the Bedrock model specification details.

          • customPrompt (string) –

            The custom prompt used in the Bedrock model specification details.

      • sampleUtteranceGeneration (dict) –

        Contains specifications for the sample utterance generation feature.

        • enabled (boolean) – [REQUIRED]

          Specifies whether to enable sample utterance generation or not.

        • bedrockModelSpecification (dict) –

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

          • modelArn (string) – [REQUIRED]

            The ARN of the foundation model used in descriptive bot building.

          • guardrail (dict) –

            The guardrail configuration in the Bedrock model specification details.

            • identifier (string) – [REQUIRED]

              The unique guardrail id for the Bedrock guardrail configuration.

            • version (string) – [REQUIRED]

              The guardrail version for the Bedrock guardrail configuration.

          • traceStatus (string) –

            The Bedrock trace status in the Bedrock model specification details.

          • customPrompt (string) –

            The custom prompt used in the Bedrock model specification details.

Return type:

dict

Returns:

Response Syntax

{
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'localeName': 'string',
    'description': 'string',
    'nluIntentConfidenceThreshold': 123.0,
    'voiceSettings': {
        'voiceId': 'string',
        'engine': 'standard'|'neural'
    },
    'botLocaleStatus': 'Creating'|'Building'|'Built'|'ReadyExpressTesting'|'Failed'|'Deleting'|'NotBuilt'|'Importing'|'Processing',
    'failureReasons': [
        'string',
    ],
    'creationDateTime': datetime(2015, 1, 1),
    'lastUpdatedDateTime': datetime(2015, 1, 1),
    'recommendedActions': [
        'string',
    ],
    'generativeAISettings': {
        'runtimeSettings': {
            'slotResolutionImprovement': {
                'enabled': True|False,
                'bedrockModelSpecification': {
                    'modelArn': 'string',
                    'guardrail': {
                        'identifier': 'string',
                        'version': 'string'
                    },
                    'traceStatus': 'ENABLED'|'DISABLED',
                    'customPrompt': 'string'
                }
            }
        },
        'buildtimeSettings': {
            'descriptiveBotBuilder': {
                'enabled': True|False,
                'bedrockModelSpecification': {
                    'modelArn': 'string',
                    'guardrail': {
                        'identifier': 'string',
                        'version': 'string'
                    },
                    'traceStatus': 'ENABLED'|'DISABLED',
                    'customPrompt': 'string'
                }
            },
            'sampleUtteranceGeneration': {
                'enabled': True|False,
                'bedrockModelSpecification': {
                    'modelArn': 'string',
                    'guardrail': {
                        'identifier': 'string',
                        'version': 'string'
                    },
                    'traceStatus': 'ENABLED'|'DISABLED',
                    'customPrompt': 'string'
                }
            }
        }
    }
}

Response Structure

  • (dict) –

    • botId (string) –

      The identifier of the bot that contains the updated locale.

    • botVersion (string) –

      The version of the bot that contains the updated locale.

    • localeId (string) –

      The language and locale of the updated bot locale.

    • localeName (string) –

      The updated locale name for the locale.

    • description (string) –

      The updated description of the locale.

    • nluIntentConfidenceThreshold (float) –

      The updated confidence threshold for inserting the AMAZON.FallbackIntent and AMAZON.KendraSearchIntent intents in the list of possible intents for an utterance.

    • voiceSettings (dict) –

      The updated Amazon Polly voice to use for voice interaction with the user.

      • voiceId (string) –

        The identifier of the Amazon Polly voice to use.

      • engine (string) –

        Indicates the type of Amazon Polly voice that Amazon Lex should use for voice interaction with the user. For more information, see the engine parameter of the SynthesizeSpeech operation in the Amazon Polly developer guide.

        If you do not specify a value, the default is standard.

    • botLocaleStatus (string) –

      The current status of the locale. When the bot status is Built the locale is ready for use.

    • failureReasons (list) –

      If the botLocaleStatus is Failed, the failureReasons field lists the errors that occurred while building the bot.

      • (string) –

    • creationDateTime (datetime) –

      A timestamp of the date and time that the locale was created.

    • lastUpdatedDateTime (datetime) –

      A timestamp of the date and time that the locale was last updated.

    • recommendedActions (list) –

      Recommended actions to take to resolve an error in the failureReasons field.

      • (string) –

    • generativeAISettings (dict) –

      Contains settings for generative AI features powered by Amazon Bedrock for your bot locale.

      • runtimeSettings (dict) –

        Contains specifications about the Amazon Lex runtime generative AI capabilities from Amazon Bedrock that you can turn on for your bot.

        • slotResolutionImprovement (dict) –

          An object containing specifications for the assisted slot resolution feature.

          • enabled (boolean) –

            Specifies whether assisted slot resolution is turned on or off.

          • bedrockModelSpecification (dict) –

            An object containing information about the Amazon Bedrock model used to assist slot resolution.

            • modelArn (string) –

              The ARN of the foundation model used in descriptive bot building.

            • guardrail (dict) –

              The guardrail configuration in the Bedrock model specification details.

              • identifier (string) –

                The unique guardrail id for the Bedrock guardrail configuration.

              • version (string) –

                The guardrail version for the Bedrock guardrail configuration.

            • traceStatus (string) –

              The Bedrock trace status in the Bedrock model specification details.

            • customPrompt (string) –

              The custom prompt used in the Bedrock model specification details.

      • buildtimeSettings (dict) –

        Contains specifications about the Amazon Lex build time generative AI capabilities from Amazon Bedrock that you can turn on for your bot.

        • descriptiveBotBuilder (dict) –

          An object containing specifications for the descriptive bot building feature.

          • enabled (boolean) –

            Specifies whether the descriptive bot building feature is activated or not.

          • bedrockModelSpecification (dict) –

            An object containing information about the Amazon Bedrock model used to interpret the prompt used in descriptive bot building.

            • modelArn (string) –

              The ARN of the foundation model used in descriptive bot building.

            • guardrail (dict) –

              The guardrail configuration in the Bedrock model specification details.

              • identifier (string) –

                The unique guardrail id for the Bedrock guardrail configuration.

              • version (string) –

                The guardrail version for the Bedrock guardrail configuration.

            • traceStatus (string) –

              The Bedrock trace status in the Bedrock model specification details.

            • customPrompt (string) –

              The custom prompt used in the Bedrock model specification details.

        • sampleUtteranceGeneration (dict) –

          Contains specifications for the sample utterance generation feature.

          • enabled (boolean) –

            Specifies whether to enable sample utterance generation or not.

          • bedrockModelSpecification (dict) –

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

            • modelArn (string) –

              The ARN of the foundation model used in descriptive bot building.

            • guardrail (dict) –

              The guardrail configuration in the Bedrock model specification details.

              • identifier (string) –

                The unique guardrail id for the Bedrock guardrail configuration.

              • version (string) –

                The guardrail version for the Bedrock guardrail configuration.

            • traceStatus (string) –

              The Bedrock trace status in the Bedrock model specification details.

            • customPrompt (string) –

              The custom prompt used in the Bedrock model specification details.

Exceptions

  • LexModelsV2.Client.exceptions.ThrottlingException

  • LexModelsV2.Client.exceptions.ServiceQuotaExceededException

  • LexModelsV2.Client.exceptions.ValidationException

  • LexModelsV2.Client.exceptions.PreconditionFailedException

  • LexModelsV2.Client.exceptions.ConflictException

  • LexModelsV2.Client.exceptions.InternalServerException