Compartir a través de


Tutorial: Build an Enterprise Assistant Bot

APPLIES TO: Composer v2.x

Note

Azure QnA Maker will be retired on 31 March 2025. Beginning 1 October 2022, you won't be able to create new QnA Maker resources or knowledge bases. A newer version of the question and answering capability is now available as part of Azure AI Language.

Custom question answering, a feature of Azure AI Language, is the updated version of the QnA Maker service. For more information about question-and-answer support in Composer, see Natural language processing.

This template includes QnA Maker features.

Create your project in Composer

The Enterprise Assistant Bot template is included in the Bot Framework Composer by default. Follow these steps to create a project:

  1. Open Bot Framework Composer (version 2.0.0 or later).
  2. On the home page, select Create new.
  3. Select the C# Enterprise Assistant Bot template.
  4. Enter your desired Name and Location.
  5. Select Azure Web App for Runtime type.
  6. Select Create. Composer takes a few moments to create your bot from the template.

After creating the bot, you'll notice errors. In the next section, you'll enter the credentials to fix them.

Note

This template doesn't support the Azure Functions runtime due to its project dependencies.

Provision Azure resources

To run locally, the Enterprise Assistant Bot requires Azure resources. Follow these steps to provision the required resources:

  1. Select the Publish button on the left. Then select the Publishing profile tab and select Create new.

  2. Fill out the values to create a publishing profile and provision resources. For more information see the Publish a bot to Azure article. The following resources are required for local development:

    • Microsoft Application Registration
    • Azure Hosting
    • Azure Bot resource
    • Microsoft Language Understanding Authoring Account
    • Microsoft QnA Maker
  3. Go to Configure > Development Resources. Then select Set up Language Understanding.

  4. Select Use existing resources and enter the subscription and the resource from the resource group you created earlier.

  5. Select Next and then select Done.

  6. Now select Set up QnA Maker. Select Use existing resources.

  7. Select your subscription and the resource created earlier. Select Next and then select Done.

Provision skills and configure authentication

Complete the setup guides for each of your skills:

Configure allowed callers

For each of your bots, follow these steps to register allowed callers:

  1. Open Configure > Skill configuration

  2. Add the App IDs that should be allowed to call your bot. For your root bot, this should be the IDs of the skills. For the skill bots, this should be the ID of the root bot.

Run and test your bot locally

  1. Running your bot in Composer will automatically add the following configuration in your root bot's settings, visible in the Advanced Settings View, enabling to your root bot to communicate with your local skills:

    "skill": {
        "Calendar": {
          "endpointUrl": "<local skill messaging endpoint>",
          "msAppId": "<skill MS App ID>"
        },
        "People": {
          "endpointUrl": "<local skill messaging endpoint>",
          "msAppId": "<skill MS App ID>"
        }
      }
    

Next steps

After you run and test your bot locally, you can follow these steps to publish your projects to Azure:

Create skill manifests & publish skills

Once your resources are provisioned and your authentication settings have been configured, follow these steps to create a skill manifest and publish each of your skills:

  1. In the Create tab, select the More Options button beside your skill project.

  2. Select Export as skill to launch the manifest creation flow

  3. Fill in the properties, dialogs, and triggers you would like to include. Learn more about skill manifests.

  4. Fill in the allowed callers field with the ID of your root bot

  5. Select the publishing profile to use for your skill endpoints

  6. Finally, select Generate and Publish to publish your skill to your endpoint with the generated manifest.

Publish to Azure

  1. Update your skill endpoints to your published endpoints in Configure > Advanced Settings View:

    "skill": {
        "Calendar": {
          "endpointUrl": "<published skill messaging endpoint>",
          "msAppId": "<skill MS App ID>"
        },
        "People": {
          "endpointUrl": "<published skill messaging endpoint>",
          "msAppId": "<skill MS App ID>"
        }
      }
    
  2. Finally, follow the steps in the Publish your bot section of the publishing to Azure article. After completing these steps your bot will be published.