Skip to content

Commit

Permalink
Fix for issue #151 on github where strings from LUIS models were not …
Browse files Browse the repository at this point in the history
…handled properly.
  • Loading branch information
chrimc62 committed Apr 22, 2016
1 parent edc0b34 commit e81b9dd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CSharp/Library/FormFlow/FormDialog.cs
Expand Up @@ -224,8 +224,9 @@ async Task IDialog<T>.StartAsync(IDialogContext context)
}
var input = builder.ToString();
await step.DefineAsync(_state);
step.Start(context, _state, _formState);
var matches = MatchAnalyzer.Coalesce(step.Match(context, _state, _formState, input), input);
if (MatchAnalyzer.IsFullMatch(input, matches, 0.5))
if (MatchAnalyzer.IsFullMatch(input, matches, 0.0))
{
// TODO: In the case of clarification
// 1) Go through them while supporting only quit or back and reset
Expand Down

3 comments on commit e81b9dd

@IanBoggs
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work? I tried this myself and found that although strings were passed to the field names correctly, commands such as 'quit' were no longer accepted for a field if a Luis Entity wasn't passed in

@chrimc62
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you be more specific on what you mean by commands like 'quit' were no longer accepted? If you mean the step was skipped if there is a value, that can be controlled by passing in FormOption.PromptFieldsWithValues when you construct FormDialog.

@IanBoggs
Copy link

@IanBoggs IanBoggs commented on e81b9dd Apr 25, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No.
For example, I have two string fields on my FormFlow. If only one of them is populated by a Luis entity, the other field was prompted as you'd expect. However, it didn't seem to accept 'quit' as a command to end the FormFlow if you entered it for that second field.
I will admit I did very limited testing and checking as I was doing several other things to the code as well.

Also, I'm having no issues with the latest V1.1 in this area neither, so I believe everything is working

Please sign in to comment.