Example #1
0
        public ActionResult Sync()
        {
            string baseUrl = HttpRuntime.AppDomainAppPath;
            string jsonUrl = baseUrl + jsonName;
            var    qnaList = RequestHandler.ParseDocumentForQnAPairs(jsonUrl);
            //var qnaService = new QnASyncService(ConfigurationManager.AppSettings["QnaMakerKnowledgebaseId"], ConfigurationManager.AppSettings["QnAMakerSubscriptionKey"], "QnASyncTesting");
            var qnaService = new QnASyncService("07fbe223-9502-44d9-b762-d0164cd678e2", ConfigurationManager.AppSettings["QnAMakerSubscriptionKey"], "QnAManual");

            qnaService.UpdateKnowlegdeBase(qnaList);
            return(RedirectToAction("Index"));
        }