public async Task<LuisResult> GetIntent(string text)
{
using (var client = new HttpClient())
{
var url = _baseAddress.SetQueryParam("id", _id)
.SetQueryParam("subscription-key", _subscriptionKey)
.SetQueryParam("q", text);
var response = await client.GetStringAsync(url);
var luisResponse = JsonConvert.DeserializeObject<LuisResponse>(response);
return LuisResult.FromLuisResponse(luisResponse);
}
}
}