Skip to main content

Extensibility and Integration

 

OutSystems

Use the Azure LUIS Connector in your OutSystems applications

Language Understanding Intelligent Services (LUIS) is a cloud-based API service that applies custom machine-learning intelligence to a user's conversational, natural language text to predict overall meaning, and pull out relevant, detailed information. The Azure LUIS connector uses LUIS to provide your apps with capabilities to extract intent from text.

Prerequisites

  1. Create a LUIS account and a LUIS application.
  2. Create a Cognitive Service or Language Understanding resource in Azure Portal.
  3. Associate the above resource to your LUIS application.
  4. Train and publish your LUIS application.

List of APIs present in the Azure LUIS Connector

The Azure LUIS Connector provides Server Actions for two different APIs:

  • LUIS Endpoint API - Obtains predictions regarding the intent of a given text
  • LUIS Programmatic API - Manages the LUIS applications and models programmatically

LUIS Endpoint API

To use the LUIS Endpoint API, do the following:

  1. Go to your LUIS account and check the region from the resource you have associated with the application. If the region is "westus" you can test and start using the Endpoint API without any further configurations. If the region is different from "westus," go to step 2.

  2. Go to Service Center and in the Applications tab under Factory, select Azure LUIS Connector.

  3. Select the module AzureLUISConnector and go to the Integrations tab.

  4. In the Integrations tab, click on LUISEndpointAPI.

  5. In the LUIS Portal, copy the Endpoint from the associated resource and obtain the Base URL from it. For example, for an Endpoint like https://westus.api.cognitive.microso...ey=XXXXXXXX&q=, the Base URL is https://westus.api.cognitive.microso...luis/v2.0/apps.

  6. Put the Base URL in the Effective URL textbox and click Apply.

You can test the Endpoint API as follows:

  1. Use the Server Action GetPredictions_Wrapper in a logic flow.

  2. From the Application Information page under the Manage tab of the LUIS Portal, copy the Application ID and add it in the ApplicationId input parameter of GetPredictions_Wrapper.

  3. From the Keys and Endpoints page under the Manage tab of the LUIS Portal, copy the Resource Key and add it in the EndpointKey input parameter of GetPredictions_Wrapper. Don’t use the key from the Starter_Key resource. The key from the Starter_Key resource is the same as the Authoring Key.

  4. Add any text in the QueryToPredict input parameter.

  5. Publish and test to confirm if the Server Action returns a prediction object.

You can now use all the Server Actions found in the folder LUISEndpointAPI. The descriptions of each input and output parameter provide more information about their usage.

You can also find more information on the LUIS Endpoint API in the official Azure API documentation..

LUIS Programmatic API

To use the LUIS Programmatic API, do the following:

  1. After installing the connector in your environment, go to your LUIS account and copy the Authoring Key.

  2. Go to Service Center and in the Applications tab under Factory, select Azure LUIS Connector.

  3. Select the module AzureLUISConnector and go to the Site Properties tab.

  4. In the Site Properties tab, click AuthoringKey. Edit the AuthoringKey value and paste the key you’ve copied from the LUIS portal.

After configuring the connector, test the Programmatic API as follows:

  1. Use the Server Action GetApplicationDomainsList in a logic flow.
  2. Enter your AuthoringRegionId. The value of the AuthoringRegionId must match the Authoring Region of your LUIS account.
  3. Publish and test to confirm that the Server Action returns a list of domains available on LUIS.

You can now use all the Server Actions found in the folder LUISProgrammaticAPI. The descriptions of each input and output parameter provide more information about their usage.

Note: When using the connector in your applications, the input parameter AuthoringRegionId of the Server Actions in this API must match the Authoring Region of your LUIS account. You can find this region in your LUIS account settings. Choose one of the 3 options provided by the static entity AuthoringRegion (also available in the connector).

You can find more information in the official Azure API documentation on LUIS Programmatic API.