Skip to content

Configuring the Azure OpenAI Action

The XO Platform lets you easily connect with the Azure OpenAI instance to find answers to your general queries. The Platform supports all common actions on Azure with ready-to-use pre-built dialog templates.

This article explains how to authorize and enable the Azure OpenAI action and install the pre-built templates.

Authorizations Supported

The Kore.ai XO Platform supports basic authentication, allowing Azure OpenAI integration to exchange data. For more information, read the Bot Authorization Overview article.

The Kore.ai XO Platform supports the following authorization types for the Azure OpenAI integration:

  • Pre-Authorize the Integration – To make the integration process smoother for developers and customers, you can pre-authorize it by providing the necessary authorization credentials to obtain the access token.
  • Allow Users to Authorize the Integration – This method requires the end user to provide credentials during the conversation for authorization. This authorization process involves requesting permission for Kore.ai’s Azure OpenAI app to access an access token at runtime. To learn more about Azure OpenAI account types, see Azure OpenAI Service.

Step 1: Create an Azure OpenAI App

Prerequisites:

Before enabling the Azure OpenAI action, complete the following prerequisites:

  • If you don’t have Azure OpenAI account credentials, create a developer account in Azure OpenAI and note down login credentials. Use the Azure OpenAI Service Documentation for more information.
  • Copy the API Key, User Sub Domain, and Deployment ID values and keep them for future use to enable the integration.

Create an Azure OpenAI Service app and configure it on the Kore.ai XO Platform to establish a communication channel between Azure OpenAI and the Kore.ai XO Platform.

Steps to create an Azure OpenAI service:

  1. Log in to the Azure portal, and search for Azure OpenAI from the portal menu.
    Login to Azure portal

  2. On the Cognitive Services Azure OpenAI page, click Create. Cognitive Services Azure OpenAI

  3. Fill in the following required details:

    1. Select an existing Resource Group or create a new one.
    2. Select the Region. For example, select the South Central US region.
    3. Enter the Name of the Azure OpenAI service. For example, enter PlatformInegration.
    4. Select the Pricing Tier option. For example, select the Standard option.
      Create Azure OpenAI service - provide required details
  4. Click Next and then click Review + Submit.

  5. Once the Validation Passed message appears, click Create.
    Create Azure OpenAI app

  6. The Azure OpenAI service is now initialized and deployed in the portal with an endpoint URL and API Keys. Click Go to Resource to view the app details.
    View app details

  7. In the Overview page, copy the User Domain Name as shown below.
    Copy User Domain name

  8. In the Left Navigation Pane, select the Keys and Endpoints menu and click Show Keys, and then copy the API Key as shown below.
    Copy API Key

  9. In the Left Navigation Pane, select Model Deployments and create a new deployment. For example, enter the model name as PlatformDeploy and select the Model as text-davinci-001. Click Save.
    Select Model and Save

  10. Copy the Model Name of the newly created deployment as shown below.
    Copy model name

  11. You can also copy the Azure OpenAI service credentials from the Azure OpenAI Studio > Playground > GPT- 3 > View Code, as shown below.
    Copy Azure OpenAI service credentials

Step 2: Enable the Azure OpenAI Action

Once you have created an Azure OpenAI service and copied the required credentials, you can enable the integration.

Steps to enable the Azure OpenAI action:

  1. Go to App Settings > Integrations > Actions.
  2. Select the Azure OpenAI action.

Pre-authorize the Integration

Basic Auth: You can authorize the integration using your credentials. The developer authorization lets you authorize the integration with the preconfigured Kore.ai app with the Basic Auth option.

Steps to authorize the Azure OpenAI action using developer credentials:

  1. Go to App Settings > Integrations > Actions and select the Azure OpenAI action.
  2. In the Configurations dialog, select the Authorization tab.
  3. Enter the following details:

    1. Authorization Type – Select the Pre-authorize the Integration option, and then select the Basic Auth option.
      Authorization Type-Basic Auth

    2. API Key – The secret API key of your Azure OpenAI service, which you copied in Step 1.

      Note

      The Platform uses the configured API Key to authorize and generate the suggestions from OpenAI.

    3. User Sub Domain – The domain name of the Azure OpenAI service, which you copied in Step 1.

    4. Deployment ID – The deployment ID/model name of the Azure OpenAI service, which you copied in Step 1.

      Note

      You can enter the deployment ID for ChatGPT-3 or ChatGPT-3.5 model to configure the GPT model for the Azure Open AI integration

  4. Click Enable. When you configure the action for the first time, the Integration Successful pop-up is displayed.
    Enable Integration

Note

The Azure OpenAI action is moved from Available to Configured region.

Allow the End User to Authorize

You can authorize the integration at a user level with their login credentials. The user authorization process involves requesting permission for Kore.ai’s Azure OpenAI app to access an access token at runtime. You can also use the basic auth profile to let a user configure the integration at runtime.

Steps to authorize an Azure OpenAI action at a user level:

  1. Go to App Settings > Integrations > Actions and select the Azure OpenAI action in the Available Actions region.
  2. In the Configurations dialog, select the Authorization tab.
  3. Enter the following details:

    1. Authorization Type – Select the Allow Users to Authorize the Integration option, and then select the Basic Auth option.
    2. Create your authorization profile to obtain an access token and use it to complete integration without using Kore.ai’s Azure OpenAI app for authorization.
    3. Click the Select Authorization drop-down and select the Create New option.
      Create new authorization

    4. Select the type of authorization mechanism. For example, select the API Key option.
      Select authorization mechanism

      To create Basic Auth profiles, see Bot Authorization Overview.

    5. Enter the following authentication credentials for the Basic Auth mechanism:

      • Name – Enter the name for the Basic Auth profile.
      • Select Yes; some tasks will have tenancy URLs, and the user must provide the URLs to authenticate successfully.
      • Base URL – Enter the base tenant URL for the Azure OpenAI instance.
      • Authorization Check URL – Enter the authorization check URL for your Azure OpenAI instance.
      • Description – Enter the description of the basic authentication profile.
    6. Click Save Auth to save the authorization profile.
      Save Authorization

    7. Select the new Authorization Profile you created to complete integration.

  4. Click Enable. When you configure the action for the first time, the Integration Successful pop-up is displayed.
    Enable integration

Step 3: Install the Azure OpenAI Action Templates

Once you have configured an Azure OpenAI integration, you can explore and install action templates.

Steps to install action templates:

  1. On the Integration Successful dialog, click the Explore Templates button to view the templates.
    Explore Templates

  2. In the Integration Templates dialog, click the Install button to begin the installation.
    Begin installation

  3. Once the template is installed, the associated dialog task is auto-created and displayed on the Dialogs page. Click Go to Dialog or go to Automation AI > Virtual Assistant > Use Cases > Dialogs.

  4. To start using the templates, see Using Azure OpenAI Templates.