public async Task <string> GetIntent(GetIntentParams parameters)
        {
            string result = null;

            //call service async
            await ServiceHelperExtensions.CallRestServiceAsync(Format.JSON, RestMethod.GET, _authorizationHeader,
                                                               new Uri($"{_cotorraUri}/GetIntent/{parameters.IdentityWorkID}/{parameters.InstanceID}/{parameters.Utterance}"),
                                                               new object[] { })
            .ContinueWith((i) =>
            {
                if (i.Exception != null)
                {
                    throw i.Exception;
                }

                result = i.Result;
            });

            return(result);
        }
Пример #2
0
 public Task <string> GetIntent(GetIntentParams parameters)
 {
     return(_client.GetIntent(parameters));
 }
Пример #3
0
        public async Task <string> GetIntent(GetIntentParams parameters)
        {
            CotorriaBotManager CotorriaBotManager = new CotorriaBotManager(new CotorriaBotLUISProvider());

            return(await CotorriaBotManager.GetIntent(parameters.Utterance));
        }