-
Notifications
You must be signed in to change notification settings - Fork 24
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
Adds support for dynamic entity value matching #205
Conversation
} | ||
], | ||
"intent": "None", | ||
"text": "what's on my calendar tomorrow" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I run something similar to this against dialogflow. The compare is failing with "Actual utterance does not have entity matching 'tomorrow"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we still have an issue with time. DF returns something like 2019-10-05T12:00:00-04:00 and what we get here is 2019-10-05T00:00:00Z so the comparison fails
In reply to: 331507665 [](ancestors = 331507665)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah good point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, actually, it shouldn't be a problem. Presumably the same client that ran the DF request will also run the compare command, so it will have the same timezone. You just need to account for how DF considers the default time to be noon instead of midnight.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I.e., your script would look like:
csharp(DateTimeOffset.Now.AddDays(1).AddHours(12).ToString("yyyy-MM-ddTHH:mm:sszzz")
I am not fully convinced of this solution yet and here is why: We can have a built in date parser that looks for entity type dates and converts those into datetime. This way the user building the test set doesn't have to worry about parsing these and converting them in the test set. |
@saroup - how do we specify how the two date objects would be compared? |
|
I think we should extract the context / timestamp logic from this and put the rest on hold for now. |
In order to support matching of dynamic entity values, this commit introduces to changes. First, it adds a `context` property to each predicted utterance from the NLU service, including a `timestamp` value for when the prediction request was made. Second, it adds a mechanism to include inline scripts, which are evaluated at runtime with Roslyn. Fixes microsoft#204
Closing PR in favor of #206 for now. |
In order to support matching of dynamic entity values, this commit introduces to changes.
First, it adds a
context
property to each predicted utterance from the NLU service, including atimestamp
value for when the prediction request was made.Second, it adds a mechanism to include inline scripts, which are evaluated at runtime with Roslyn.
Fixes #204