LexModelsV2 / Client / start_bot_recommendation

start_bot_recommendation#

LexModelsV2.Client.start_bot_recommendation(**kwargs)#

Use this to provide your transcript data, and to start the bot recommendation process.

See also: AWS API Documentation

Request Syntax

response = client.start_bot_recommendation(
    botId='string',
    botVersion='string',
    localeId='string',
    transcriptSourceSetting={
        's3BucketTranscriptSource': {
            's3BucketName': 'string',
            'pathFormat': {
                'objectPrefixes': [
                    'string',
                ]
            },
            'transcriptFormat': 'Lex',
            'transcriptFilter': {
                'lexTranscriptFilter': {
                    'dateRangeFilter': {
                        'startDateTime': datetime(2015, 1, 1),
                        'endDateTime': datetime(2015, 1, 1)
                    }
                }
            },
            'kmsKeyArn': 'string'
        }
    },
    encryptionSetting={
        'kmsKeyArn': 'string',
        'botLocaleExportPassword': 'string',
        'associatedTranscriptsPassword': 'string'
    }
)
Parameters:
  • botId (string) –

    [REQUIRED]

    The unique identifier of the bot containing the bot recommendation.

  • botVersion (string) –

    [REQUIRED]

    The version of the bot containing the bot recommendation.

  • localeId (string) –

    [REQUIRED]

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

  • transcriptSourceSetting (dict) –

    [REQUIRED]

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

    • s3BucketTranscriptSource (dict) –

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

      • s3BucketName (string) – [REQUIRED]

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

      • pathFormat (dict) –

        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.

        • objectPrefixes (list) –

          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.

          • (string) –

      • transcriptFormat (string) – [REQUIRED]

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

      • transcriptFilter (dict) –

        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.

        • lexTranscriptFilter (dict) –

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

          • dateRangeFilter (dict) –

            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.

            • startDateTime (datetime) – [REQUIRED]

              A timestamp indicating the start date for the date range filter.

            • endDateTime (datetime) – [REQUIRED]

              A timestamp indicating the end date for the date range filter.

      • kmsKeyArn (string) –

        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.

  • encryptionSetting (dict) –

    The object representing the passwords that will be used to encrypt the data related to the bot recommendation results, as well as the KMS key ARN used to encrypt the associated metadata.

    • kmsKeyArn (string) –

      The KMS key ARN used to encrypt the metadata associated with the bot recommendation.

    • botLocaleExportPassword (string) –

      The password used to encrypt the recommended bot recommendation file.

    • associatedTranscriptsPassword (string) –

      The password used to encrypt the associated transcript file.

Return type:

dict

Returns:

Response Syntax

{
    'botId': 'string',
    'botVersion': 'string',
    'localeId': 'string',
    'botRecommendationStatus': 'Processing'|'Deleting'|'Deleted'|'Downloading'|'Updating'|'Available'|'Failed'|'Stopping'|'Stopped',
    'botRecommendationId': 'string',
    'creationDateTime': datetime(2015, 1, 1),
    'transcriptSourceSetting': {
        's3BucketTranscriptSource': {
            's3BucketName': 'string',
            'pathFormat': {
                'objectPrefixes': [
                    'string',
                ]
            },
            'transcriptFormat': 'Lex',
            'transcriptFilter': {
                'lexTranscriptFilter': {
                    'dateRangeFilter': {
                        'startDateTime': datetime(2015, 1, 1),
                        'endDateTime': datetime(2015, 1, 1)
                    }
                }
            },
            'kmsKeyArn': 'string'
        }
    },
    'encryptionSetting': {
        'kmsKeyArn': 'string',
        'botLocaleExportPassword': 'string',
        'associatedTranscriptsPassword': 'string'
    }
}

Response Structure

  • (dict) –

    • botId (string) –

      The unique identifier of the bot containing the bot recommendation.

    • botVersion (string) –

      The version of the bot containing the bot recommendation.

    • localeId (string) –

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

    • botRecommendationStatus (string) –

      The status of the bot recommendation.

      If the status is Failed, then the reasons for the failure are listed in the failureReasons field.

    • botRecommendationId (string) –

      The identifier of the bot recommendation that you have created.

    • creationDateTime (datetime) –

      A timestamp of the date and time that the bot recommendation was created.

    • transcriptSourceSetting (dict) –

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

      • s3BucketTranscriptSource (dict) –

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

        • s3BucketName (string) –

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

        • pathFormat (dict) –

          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.

          • objectPrefixes (list) –

            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.

            • (string) –

        • transcriptFormat (string) –

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

        • transcriptFilter (dict) –

          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.

          • lexTranscriptFilter (dict) –

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

            • dateRangeFilter (dict) –

              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.

              • startDateTime (datetime) –

                A timestamp indicating the start date for the date range filter.

              • endDateTime (datetime) –

                A timestamp indicating the end date for the date range filter.

        • kmsKeyArn (string) –

          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.

    • encryptionSetting (dict) –

      The object representing the passwords that were used to encrypt the data related to the bot recommendation results, as well as the KMS key ARN used to encrypt the associated metadata.

      • kmsKeyArn (string) –

        The KMS key ARN used to encrypt the metadata associated with the bot recommendation.

      • botLocaleExportPassword (string) –

        The password used to encrypt the recommended bot recommendation file.

      • associatedTranscriptsPassword (string) –

        The password used to encrypt the associated transcript file.

Exceptions

  • LexModelsV2.Client.exceptions.ThrottlingException

  • LexModelsV2.Client.exceptions.ServiceQuotaExceededException

  • LexModelsV2.Client.exceptions.ValidationException

  • LexModelsV2.Client.exceptions.ResourceNotFoundException

  • LexModelsV2.Client.exceptions.ConflictException

  • LexModelsV2.Client.exceptions.PreconditionFailedException

  • LexModelsV2.Client.exceptions.ConflictException

  • LexModelsV2.Client.exceptions.InternalServerException