Пример #1
0
        /// <summary>
        /// Capture intent and entities from a text string
        /// </summary>
        /// <param name="text">Text string to capture from</param>
        /// <returns>Captured data</returns>
        public async Task <WitResponse> CaptureTextIntent(string text)
        {
            WitMessageRequestTask witMessageRequestTask = new WitMessageRequestTask(accessToken, text);

            string result = await witMessageRequestTask.GetAsync();

            if (result != null)
            {
                WitResponse witResponse = JsonConvert.DeserializeObject <WitResponse>(result);

                return(witResponse);
            }

            return(null);
        }
Пример #2
0
        /// <summary>
        /// Capture intent and entities from a text string
        /// </summary>
        /// <param name="text">Text string to capture from</param>
        /// <returns>Captured data</returns>
        public async Task<WitResponse> CaptureTextIntent(string text)
        {
            WitMessageRequestTask witMessageRequestTask = new WitMessageRequestTask(accessToken, text);

            string result = await witMessageRequestTask.GetAsync();

            if (result != null)
            {
                WitResponse witResponse = JsonConvert.DeserializeObject<WitResponse>(result);

                return witResponse;
            }

            return null;
        }