private async Task <string> ParseLuisResponse(LuisResponse luisResponse) { Intent winner = luisResponse.Winner(); if (winner == null || winner.IsNone()) { return(Sad); } return(luisResponse.Winner().Name); }
private async Task <string> ParseLuisResponse(LuisResponse luisResponse) { Intent winner = luisResponse.Winner(); if (winner == null || winner.IsNone()) { return(Sad); } if (winner.Name.Equals(WeatherInTownIntent)) { Entity townEntity = luisResponse.Entities .First(e => e.Type.Equals(TownEntity, StringComparison.InvariantCultureIgnoreCase)); OpenWeatherMapClient client = OpenWeatherMapClient.Create(); return(await client.CurrentWeatherDescription(townEntity.Value)); } return(Sad); }