qna-maker-connector
Service icon

QnA Maker Connector

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 09 October 2023
 by 
5.0
 (2 ratings)
qna-maker-connector

QnA Maker Connector

Documentation
1.0.0

Instructions:

1.Sign up for your free subscription at https://azure.microsoft.com/en-us/free/

2.Login to your free account

3.In the search bar at the top of the page, enter the word "Resources"

4.From the results drop-down list select "Resource Groups"

5.Choose "+ Create" to create a new resource group

6.Name your resource group and select the region. Then press "Review + create" at the bottom of the page

7.Review the resource group settings and then press "Create" at the bottom of the page

8.Return to the Microsoft Azure home page

9.Select "Azure AI service" from the top of the page, or search for it if it is not currently showing


10.Select the "+ Create" option under "Language Service"

11.On the resulting page, press the "Select" button in the "Custom question answering" Custom feature.


12.On the resulting page, fill in the required fields. Note the "Name" you have chosen in the "Instance Details" section. Then press the "Review + create" button at the bottom of the page


13.On the resulting page press the "Create" button at the bottom of the page

14.The deployment status will be shown on the screen


15.You will be notified once the deployment is complete


16.Return to the Microsoft Azure home page

17.Select the language service that you just created. This service will have the "Name" you noted in step 12 above. It may take several minutes before the language service is available. Remember to refresh every few minutes.


18.In the detail page for your language service select "Keys and Endpoint" from the left sidebar


19.Copy the values for "Key 1" and "Endpoint". You will need these values when configuring the API and site properties in the OutSystems project.

20.Open the QnAMaker_Connector Module in Service Studio

21.Go to the "Data" tab, expand "Site Properties" and set the value of the "AnswerKey" site property to the value for Key 1 that you copied in step 19


22.Go to the "Logic" tab, expand "Integrations", expand "REST", select "answerCognitiveservicesAzure"


23.Replace the "Base URL" property with the Endpoint you copied in step 19

24.Expand "answerCognitiveservicesAzure" and double-click on the "Post_Answers" endpoint.


25.The "Post_Answer" endpoint test window will appear

26.Open the "Test" tab

27.Enter the value for Key 1 copied in step 19 into the request header value input named Ocp-Apim-Subscription-Key

28.Enter a request body. A sample can be found below:

 

{

  "question": "how long it takes to charge surface?",

  "records": [

    {

      "id": "1",

      "text": "Power and charging. It takes two to four hours to charge the Surface Pro 4 battery fully from an empty state. It can take longer if you’re using your Surface for power-intensive activities like gaming or video streaming while you’re charging it."

    },

    {

      "id": "2",

      "text": "You can use the USB port on your Surface Pro 4 power supply to charge other devices, like a phone, while your Surface charges. The USB port on the power supply is only for charging, not for data transfer. If you want to use a USB device, plug it into the USB port on your Surface."

    }

  ],

  "language": "en"

}

 

29.Press the "Test" button. If the test is not successful, please review the previous steps in this document. Once the test is successful, continue.

30.Open the QnAConnector_Demo module in Service Studio

31.Open the "Data" tab.

32.Expand "Entities, expand "Database" and double-click the entity named "QnaMakerQuestions"

33.Enter these three questions into the entity (use the button labeled "Add row" to add blank rows to the entity)

  1. What is your name?

  2. How old are you?

  3. Where do you work?

34.Press the "Apply" button in the bottom right of the screen to save these new rows in the entity.


35.Run the QnA Maker Demo in the web browser

36.Press the "Ask Questions" button

37.Witness the magic of AI

38.Give this component a glowing review