public void ExecuteCommandTest() { var commandString = "Marian, please finish the business analysis today"; var res = LUISHelper.ExecuteCommand(commandString); Assert.IsTrue(res); }
// POST api/Command public string Post([FromBody] string jsonString) { // var commands = jsonString.ToString(); var cmdArray = commands.Split('\n'); foreach (var cmd in cmdArray) { //var ret = LUISHelper.UnderstandCommand(cmd); var res = LUISHelper.ExecuteCommand(cmd); } return(string.Empty); }
// POST api/values public void Post([FromUri] string id, [FromUri] string state) { // I get the notification that a video is indexed //get the video breakdown if (state.Equals("Processed", StringComparison.CurrentCultureIgnoreCase)) { var videoBreakdownJson = VideoHelper.GetVideoBreakdown(id); if (!String.IsNullOrEmpty(videoBreakdownJson)) { var transcript = TranscriptProcessor.ProcessVideoBreakDown(videoBreakdownJson); // approve transcript // send email to all participants var commands = TranscriptProcessor.GetCommands(videoBreakdownJson); foreach (var command in commands) { //send transcript to LUIS //var jsonCmd = LUISHelper.UnderstandCommand(command); var succeded = LUISHelper.ExecuteCommand(command); } } } }