internal virtual void AddIntentExample(IntentExampleJson intent)
        {
            string uri         = luis.UriRoot + "example";
            string requestBody = JsonConvert.SerializeObject(intent);

            var response = luis.SendPost(uri, requestBody, true).Result;
            var result   = response.Content.ReadAsStringAsync().Result;
        }
        public virtual LuisModelBuilder AddIntentExample(string intentName, IList <Entitylabel> entitiesInExample)
        {
            this.fn = Compose(this.fn, (modelBuilder) =>
            {
                var examplejson = new IntentExampleJson(entitiesInExample.First().IntentExample, intentName, entitiesInExample);
                modelBuilder.AddIntentExample(examplejson);

                return(modelBuilder);
            });
            return(this);
        }
        public virtual LuisModelBuilder AddIntentExample(string intentName, string intentExample)
        {
            this.fn = Compose(this.fn, (modelBuilder) =>
            {
                var examplejson = new IntentExampleJson(intentExample, intentName);
                modelBuilder.AddIntentExample(examplejson);

                return(modelBuilder);
            });
            return(this);
        }
        public virtual LuisModelBuilder AddIntent(string intentName, IList <Entitylabel> entitiesInExample)
        {
            this.fn = Compose(this.fn, (modelBuilder) =>
            {
                string uri      = luis.UriRoot + "intents";
                string jsonBody = "{ \"name\": \"" + intentName + "\"}";
                luis.SendPost(uri, jsonBody, true).Wait();

                var examplejson = new IntentExampleJson(entitiesInExample.First().IntentExample, intentName, entitiesInExample);
                modelBuilder.AddIntentExample(examplejson);

                return(modelBuilder);
            });
            return(this);
        }