private async Task <DialogTurnResult> GetNewClauseAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) { string result = stepContext.Result.ToString(); selectedClauseID = Convert.ToInt32(result.Split(" ")[2]); LuisClause selectedClause = selectedQuery.getClauses()[selectedClauseID]; var messageText = "Type in the new clause!"; var promptMessage = MessageFactory.Text(messageText, messageText, InputHints.ExpectingInput); return(await stepContext.PromptAsync(nameof(TextPrompt), new PromptOptions { Prompt = promptMessage }, cancellationToken)); }
private async Task <DialogTurnResult> ReplaceClauseAsync(WaterfallStepContext stepContext, CancellationToken cancellationToken) { var luisResult = await _luisRecognizer.RecognizeAsync <GeneralStatemenHandler>(stepContext.Context, cancellationToken); Dictionary <LuisClause, string> nc = new Dictionary <LuisClause, string>(); ClauseHandler ch = new ClauseHandler(luisResult, nc); LuisClause newClause = nc.Last().Key; selectedQuery.getClauses()[selectedClauseID] = newClause; return(await stepContext.NextAsync()); }