Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set recognized properties even if interruption is off #2360

Merged
merged 4 commits into from
Jun 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions libraries/botbuilder-dialogs-adaptive/src/adaptiveDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,13 @@ export class AdaptiveDialog<O extends object = {}> extends DialogContainer<O> {
case AdaptiveEvents.recognizeUtterance:
if (activity.type == ActivityTypes.Message) {
// Recognize utterance
const recognized = await this.onRecognize(actionContext, activity);
const recognizedResult = await this.onRecognize(actionContext, activity);
// TODO figure out way to not use turn state to pass this value back to caller.
actionContext.state.setValue(TurnPath.recognized, recognized);
actionContext.state.setValue(TurnPath.recognized, recognizedResult);
const { intent, score } = getTopScoringIntent(recognizedResult);
actionContext.state.setValue(TurnPath.topIntent, intent);
actionContext.state.setValue(TurnPath.topScore, score);
actionContext.state.setValue(DialogPath.lastIntent, intent);
handled = true;
}
break;
Expand Down