QBusiness

2025/02/04 - QBusiness - 2 updated api methods

Changes  Adds functionality to enable/disable a new Q Business Chat orchestration feature. If enabled, Q Business can orchestrate over datasources and plugins without the need for customers to select specific chat modes.

GetChatControlsConfiguration (updated) Link ¶
Changes (response)
{'orchestrationConfiguration': {'control': 'ENABLED | DISABLED'}}

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

See also: AWS API Documentation

Request Syntax

client.get_chat_controls_configuration(
    applicationId='string',
    maxResults=123,
    nextToken='string'
)
type applicationId:

string

param applicationId:

[REQUIRED]

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

type maxResults:

integer

param maxResults:

The maximum number of configured chat controls to return.

type nextToken:

string

param nextToken:

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

rtype:

dict

returns:

Response Syntax

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

Response Structure

  • (dict) --

    • responseScope (string) --

      The response scope configured for a Amazon Q Business 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.

    • orchestrationConfiguration (dict) --

      The chat response orchestration settings for your application.

      • control (string) --

        Information about whether chat orchestration is enabled or disabled for an Amazon Q Business application.

    • blockedPhrases (dict) --

      The phrases blocked from chat by your chat control configuration.

      • blockedPhrases (list) --

        A list of phrases blocked from a Amazon Q Business 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.

    • topicConfigurations (list) --

      The topic specific controls configured for a Amazon Q Business application.

      • (dict) --

        The topic specific controls configured for an Amazon Q Business application.

        • name (string) --

          A name for your topic control configuration.

        • description (string) --

          A description for your topic control configuration. Use this to 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) --

        • rules (list) --

          Rules defined for a topic configuration.

          • (dict) --

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

            • includedUsersAndGroups (dict) --

              Users and groups to be included in a rule.

              • userIds (list) --

                The user ids associated with a topic control rule.

                • (string) --

              • userGroups (list) --

                The user group names associated with a topic control rule.

                • (string) --

            • excludedUsersAndGroups (dict) --

              Users and groups to be excluded from a rule.

              • userIds (list) --

                The user ids associated with a topic control rule.

                • (string) --

              • userGroups (list) --

                The user group names associated with a topic control rule.

                • (string) --

            • ruleType (string) --

              The type of rule.

            • ruleConfiguration (dict) --

              The configuration information for a rule.

              • contentBlockerRule (dict) --

                A rule for configuring how Amazon Q Business 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 Business application for a specific topic control configuration.

                • eligibleDataSources (list) --

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

                  • (dict) --

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

                    • indexId (string) --

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

                    • dataSourceId (string) --

                      The identifier of the data source.

    • creatorModeConfiguration (dict) --

      The configuration details for CREATOR_MODE.

      • creatorModeControl (string) --

        Information about whether creator mode is enabled or disabled for an Amazon Q Business application.

    • nextToken (string) --

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

UpdateChatControlsConfiguration (updated) Link ¶
Changes (request)
{'orchestrationConfiguration': {'control': 'ENABLED | DISABLED'}}

Updates a set of chat controls configured for an existing Amazon Q Business application.

See also: AWS API Documentation

Request Syntax

client.update_chat_controls_configuration(
    applicationId='string',
    clientToken='string',
    responseScope='ENTERPRISE_CONTENT_ONLY'|'EXTENDED_KNOWLEDGE_ENABLED',
    orchestrationConfiguration={
        'control': 'ENABLED'|'DISABLED'
    },
    blockedPhrasesConfigurationUpdate={
        'blockedPhrasesToCreateOrUpdate': [
            'string',
        ],
        'blockedPhrasesToDelete': [
            'string',
        ],
        'systemMessageOverride': 'string'
    },
    topicConfigurationsToCreateOrUpdate=[
        {
            'name': 'string',
            'description': 'string',
            'exampleChatMessages': [
                'string',
            ],
            'rules': [
                {
                    'includedUsersAndGroups': {
                        'userIds': [
                            'string',
                        ],
                        'userGroups': [
                            'string',
                        ]
                    },
                    'excludedUsersAndGroups': {
                        'userIds': [
                            'string',
                        ],
                        'userGroups': [
                            'string',
                        ]
                    },
                    'ruleType': 'CONTENT_BLOCKER_RULE'|'CONTENT_RETRIEVAL_RULE',
                    'ruleConfiguration': {
                        'contentBlockerRule': {
                            'systemMessageOverride': 'string'
                        },
                        'contentRetrievalRule': {
                            'eligibleDataSources': [
                                {
                                    'indexId': 'string',
                                    'dataSourceId': 'string'
                                },
                            ]
                        }
                    }
                },
            ]
        },
    ],
    topicConfigurationsToDelete=[
        {
            'name': 'string',
            'description': 'string',
            'exampleChatMessages': [
                'string',
            ],
            'rules': [
                {
                    'includedUsersAndGroups': {
                        'userIds': [
                            'string',
                        ],
                        'userGroups': [
                            'string',
                        ]
                    },
                    'excludedUsersAndGroups': {
                        'userIds': [
                            'string',
                        ],
                        'userGroups': [
                            'string',
                        ]
                    },
                    'ruleType': 'CONTENT_BLOCKER_RULE'|'CONTENT_RETRIEVAL_RULE',
                    'ruleConfiguration': {
                        'contentBlockerRule': {
                            'systemMessageOverride': 'string'
                        },
                        'contentRetrievalRule': {
                            'eligibleDataSources': [
                                {
                                    'indexId': 'string',
                                    'dataSourceId': 'string'
                                },
                            ]
                        }
                    }
                },
            ]
        },
    ],
    creatorModeConfiguration={
        'creatorModeControl': 'ENABLED'|'DISABLED'
    }
)
type applicationId:

string

param applicationId:

[REQUIRED]

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

type clientToken:

string

param clientToken:

A token that you provide to identify the request to update a Amazon Q Business application chat configuration.

This field is autopopulated if not provided.

type responseScope:

string

param responseScope:

The response scope configured for your 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.

type orchestrationConfiguration:

dict

param orchestrationConfiguration:

The chat response orchestration settings for your application.

  • control (string) -- [REQUIRED]

    Status information about whether chat orchestration is activated or deactivated for your Amazon Q Business application.

type blockedPhrasesConfigurationUpdate:

dict

param blockedPhrasesConfigurationUpdate:

The phrases blocked from chat by your chat control configuration.

  • blockedPhrasesToCreateOrUpdate (list) --

    Creates or updates a blocked phrases configuration in your Amazon Q Business application.

    • (string) --

  • blockedPhrasesToDelete (list) --

    Deletes a blocked phrases configuration in your Amazon Q Business application.

    • (string) --

  • systemMessageOverride (string) --

    The configured custom message displayed to your end user when they use blocked phrase during chat.

type topicConfigurationsToCreateOrUpdate:

list

param topicConfigurationsToCreateOrUpdate:

The configured topic specific chat controls you want to update.

  • (dict) --

    The topic specific controls configured for an Amazon Q Business application.

    • name (string) -- [REQUIRED]

      A name for your topic control configuration.

    • description (string) --

      A description for your topic control configuration. Use this to 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) --

    • rules (list) -- [REQUIRED]

      Rules defined for a topic configuration.

      • (dict) --

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

        • includedUsersAndGroups (dict) --

          Users and groups to be included in a rule.

          • userIds (list) --

            The user ids associated with a topic control rule.

            • (string) --

          • userGroups (list) --

            The user group names associated with a topic control rule.

            • (string) --

        • excludedUsersAndGroups (dict) --

          Users and groups to be excluded from a rule.

          • userIds (list) --

            The user ids associated with a topic control rule.

            • (string) --

          • userGroups (list) --

            The user group names associated with a topic control rule.

            • (string) --

        • ruleType (string) -- [REQUIRED]

          The type of rule.

        • ruleConfiguration (dict) --

          The configuration information for a rule.

          • contentBlockerRule (dict) --

            A rule for configuring how Amazon Q Business 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 Business application for a specific topic control configuration.

            • eligibleDataSources (list) --

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

              • (dict) --

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

                • indexId (string) --

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

                • dataSourceId (string) --

                  The identifier of the data source.

type topicConfigurationsToDelete:

list

param topicConfigurationsToDelete:

The configured topic specific chat controls you want to delete.

  • (dict) --

    The topic specific controls configured for an Amazon Q Business application.

    • name (string) -- [REQUIRED]

      A name for your topic control configuration.

    • description (string) --

      A description for your topic control configuration. Use this to 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) --

    • rules (list) -- [REQUIRED]

      Rules defined for a topic configuration.

      • (dict) --

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

        • includedUsersAndGroups (dict) --

          Users and groups to be included in a rule.

          • userIds (list) --

            The user ids associated with a topic control rule.

            • (string) --

          • userGroups (list) --

            The user group names associated with a topic control rule.

            • (string) --

        • excludedUsersAndGroups (dict) --

          Users and groups to be excluded from a rule.

          • userIds (list) --

            The user ids associated with a topic control rule.

            • (string) --

          • userGroups (list) --

            The user group names associated with a topic control rule.

            • (string) --

        • ruleType (string) -- [REQUIRED]

          The type of rule.

        • ruleConfiguration (dict) --

          The configuration information for a rule.

          • contentBlockerRule (dict) --

            A rule for configuring how Amazon Q Business 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 Business application for a specific topic control configuration.

            • eligibleDataSources (list) --

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

              • (dict) --

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

                • indexId (string) --

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

                • dataSourceId (string) --

                  The identifier of the data source.

type creatorModeConfiguration:

dict

param creatorModeConfiguration:

The configuration details for CREATOR_MODE.

  • creatorModeControl (string) -- [REQUIRED]

    Status information about whether CREATOR_MODE has been enabled or disabled. The default status is DISABLED.

rtype:

dict

returns:

Response Syntax

{}

Response Structure

  • (dict) --