Exemple #1
0
        public static LuisResult FromLuisResponse(LuisResponse response)
        {
            Check.Required <ArgumentNullException>(() => response != null);

            var intent   = response.Intents?[0]?.Intent;
            var entities = response.Entities?.ToDictionary(e => e.Type, e => e.Entity) ?? new Dictionary <string, string>();

            return(new LuisResult(intent, entities));
        }
Exemple #2
0
        public static LuisResult FromLuisResponse(LuisResponse response)
        {
            Check.Required<ArgumentNullException>(() => response != null);

            var intent = response.Intents?[0]?.Intent;
            var entities = response.Entities?.ToDictionary(e => e.Type, e => e.Entity) ?? new Dictionary<string, string>();

            return new LuisResult(intent, entities);
        }