QBusiness / Client / get_chat_controls_configuration

get_chat_controls_configuration#

QBusiness.Client.get_chat_controls_configuration(**kwargs)#

Gets information about an chat controls configured for an existing Amazon Q application.

See also: AWS API Documentation

Request Syntax

response = client.get_chat_controls_configuration(
    applicationId='string',
    maxResults=123,
    nextToken='string'
)
Parameters:
  • applicationId (string) –

    [REQUIRED]

    The identifier of the application for which the chat controls are configured.

  • maxResults (integer) – The maximum number of configured chat controls to return.

  • nextToken (string) – If the maxResults response was incomplete because there is more data to retrieve, Amazon Q returns a pagination token in the response. You can use this pagination token to retrieve the next set of Amazon Q chat controls configured.

Return type:

dict

Returns:

Response Syntax

{
    'blockedPhrases': {
        'blockedPhrases': [
            'string',
        ],
        'systemMessageOverride': 'string'
    },
    'nextToken': 'string',
    'responseScope': 'ENTERPRISE_CONTENT_ONLY'|'EXTENDED_KNOWLEDGE_ENABLED',
    'topicConfigurations': [
        {
            'description': 'string',
            'exampleChatMessages': [
                'string',
            ],
            'name': 'string',
            'rules': [
                {
                    'excludedUsersAndGroups': {
                        'userGroups': [
                            'string',
                        ],
                        'userIds': [
                            'string',
                        ]
                    },
                    'includedUsersAndGroups': {
                        'userGroups': [
                            'string',
                        ],
                        'userIds': [
                            'string',
                        ]
                    },
                    'ruleConfiguration': {
                        'contentBlockerRule': {
                            'systemMessageOverride': 'string'
                        },
                        'contentRetrievalRule': {
                            'eligibleDataSources': [
                                {
                                    'dataSourceId': 'string',
                                    'indexId': 'string'
                                },
                            ]
                        }
                    },
                    'ruleType': 'CONTENT_BLOCKER_RULE'|'CONTENT_RETRIEVAL_RULE'
                },
            ]
        },
    ]
}

Response Structure

  • (dict) –

    • blockedPhrases (dict) –

      The phrases blocked from chat by your chat control configuration.

      • blockedPhrases (list) –

        A list of phrases blocked from a Amazon Q web experience chat.

        • (string) –

      • systemMessageOverride (string) –

        The configured custom message displayed to an end user informing them that they’ve used a blocked phrase during chat.

    • nextToken (string) –

      If the maxResults response was incomplete because there is more data to retrieve, Amazon Q returns a pagination token in the response. You can use this pagination token to retrieve the next set of Amazon Q chat controls configured.

    • responseScope (string) –

      The response scope configured for a Amazon Q application. This determines whether your application uses its retrieval augmented generation (RAG) system to generate answers only from your enterprise data, or also uses the large language models (LLM) knowledge to respons to end user questions in chat.

    • topicConfigurations (list) –

      The topic specific controls configured for a Amazon Q application.

      • (dict) –

        The topic specific controls configured for an Amazon Q application.

        • description (string) –

          A description for your topic control configuration. Use this outline how the large language model (LLM) should use this topic control configuration.

        • exampleChatMessages (list) –

          A list of example phrases that you expect the end user to use in relation to the topic.

          • (string) –

        • name (string) –

          A name for your topic control configuration.

        • rules (list) –

          Rules defined for a topic configuration.

          • (dict) –

            Guardrail rules for an Amazon Q application. Amazon Q supports only one rule at a time.

            • excludedUsersAndGroups (dict) –

              Users and groups to be excluded from a rule.

              • userGroups (list) –

                The user groups associated with a topic control rule.

                • (string) –

              • userIds (list) –

                The user ids associated with a topic control rule.

                • (string) –

            • includedUsersAndGroups (dict) –

              Users and groups to be included in a rule.

              • userGroups (list) –

                The user groups associated with a topic control rule.

                • (string) –

              • userIds (list) –

                The user ids associated with a topic control rule.

                • (string) –

            • ruleConfiguration (dict) –

              The configuration information for a rule.

              Note

              This is a Tagged Union structure. Only one of the following top level keys will be set: contentBlockerRule, contentRetrievalRule. If a client receives an unknown member it will set SDK_UNKNOWN_MEMBER as the top level key, which maps to the name or tag of the unknown member. The structure of SDK_UNKNOWN_MEMBER is as follows:

              'SDK_UNKNOWN_MEMBER': {'name': 'UnknownMemberName'}
              
              • contentBlockerRule (dict) –

                A rule for configuring how Amazon Q responds when it encounters a a blocked topic.

                • systemMessageOverride (string) –

                  The configured custom message displayed to an end user informing them that they’ve used a blocked phrase during chat.

              • contentRetrievalRule (dict) –

                Rules for retrieving content from data sources connected to a Amazon Q application for a specific topic control configuration.

                • eligibleDataSources (list) –

                  Specifies data sources in a Amazon Q application to use for content generation.

                  • (dict) –

                    The identifier of the data source Amazon Q will generate responses from.

                    • dataSourceId (string) –

                      The identifier of the data source.

                    • indexId (string) –

                      The identifier of the index the data source is attached to.

            • ruleType (string) –

              The type fo rule.

Exceptions

  • QBusiness.Client.exceptions.ResourceNotFoundException

  • QBusiness.Client.exceptions.InternalServerException

  • QBusiness.Client.exceptions.ThrottlingException

  • QBusiness.Client.exceptions.ValidationException

  • QBusiness.Client.exceptions.AccessDeniedException