To incorporate a call to LUIS, we can start by adding this function. It simply calls LUIS and returns the phrases identified by LUIS, such as name, city, company name, and so on.
Place your LUIS app endpoint URL, which you copied from the preceding step, in to the following variable in your code:
var luisRequestURL = "https://api.projectoxford.ai/luis/v1/application?id= fbec04e7-8bda-4160-a059-a8f8b995184b&subscription- key=ENTER_KEY_HERE";
Next, append the user message, which we get from the user to the luisRequestUrl and do a Get request:
httpClient = new HttpClient(); HttpResponseMessage response = await httpClient.GetAsync(luisRequestURL + "&q=" + messagetext); string luisResponseString = await response.Content.ReadAsStringAsync(); ...