Example #1
0
        /// <summary>
        /// 腾讯智能闲聊
        /// </summary>
        /// <param name="session"></param>
        /// <param name="ask"></param>
        /// <returns></returns>
        public static BaseResp <Nlp_TextChatResp> Chat(string session, string ask)
        {
            Nlp_TextChatRequest req = new Nlp_TextChatRequest
            {
                session  = session,
                question = ask
            };

            req.sign = Utils.Sign(req, _apiKey);
            return(HttpUtils.Get <BaseResp <Nlp_TextChatResp> >(Utils.getChatUrl() + "?" + Utils.Parameter(req)));
        }
Example #2
0
        public static string Nlp_TextChat(Nlp_TextChatRequest request)
        {
            var uri = "https://api.ai.qq.com/fcgi-bin/nlp/nlp_textchat";

            return(Aid.Request(request, uri, "GET"));
        }