In the previous step, we set up and configured the LUIS app and also trained it. Now, let's see how you can use the LUIS app in a bot application. To incorporate a call to LUIS, we can start by adding the mentioned function. It simply calls LUIS REST API and returns the phrases and intents we set up in LUIS, for example, name, city, company name, and so on.
Return to Visual Studio and open the MessagesController.cs file; under the Post method, update the code to get the LUIS results, as follows:
var luisOutputString = "Intent and Language Understanding Intelligence Service Processing results are \r \n";
The following line of code is where we frame a LUIS app REST API URL--if you observe, we are passing the LUIS app ID and LUIS subscription key; this is the URL you copied from the above step, publishing settings of the LUIS app:
var luisRequestURL =
...