- Notifications
You must be signed in to change notification settings - Fork 492
Zoma/testbot2 #4245
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
Zoma/testbot2 #4245
Conversation
Move QnAMaker Dialog/Recognizer out of Adaptive and into QnA assembly
* init multi-lang * add templates dict test * revert some renaming * make the default fallback is empty string * renaming * renaming * renaming * comments * add comments
* revert the caching behavior of json converters * ref QnaMakerDialog
* Move logic into base class * Add activityProcessed which if set to false will emit event to cause parent to process activity. * Unit tests etc.
Rename updateHandlers to deleteHandlers
- Make BotState.CachedBotState public while changing its members from public to internal - Make BotState.GetCachedState public - Add a null check for newly public method and use BotAssert in other methods for consistency - Document newly public method - Write test for newly public method
* added scoped Services property to DC. * changed ITemplate to be DialogContext based (and default to dc.State for data) * Added 3 calls to OnSetScopedServices to appropriate model scoped service for generator * changed ActionScope to use parent scoped services on resumption.
Implement Reprompt in way that maintains dialogcontext for AD.
Added tests for ActivityTemplateConverter and fixed issue loading StaticActivityTemplate
* refactored InterfaceConverter to allow better control for children to reuse * custom serilization for staticActivityTemplate and ActivityTemplate * fixed schema around activity definition
…builder-dotnet into tomlm/schemaTweaks
tweaks to schema per feedback from composer team
chrimc62 left a comment
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.
🕐
chrimc62 left a comment
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.
![]()
gabog left a comment
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.
This PR seems to include changes that are not properly described in the root issue (or the PR comments).
Consider making the QnAMakerExtensions a separate PR or update the issue description to reflect what's being done.
The change that this PR is trying to address (default answer) does not seem to have a unit test associated with it.
| var environment = configuration.GetValue<string>("environment") ?? Environment.UserName; | ||
| var settings = new Dictionary<string, string>(); | ||
| settings["luis:endpoint"] = $"https://{luisRegion}.api.cognitive.microsoft.com"; | ||
| settings["luis:endpoint"] = configuration.GetValue<string>("luis:endpoint") ?? $"https://{luisRegion}.api.cognitive.microsoft.com"; |
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.
How is this related to the issue associated with this PR?
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 have discarded this change.
| /// <summary> | ||
| /// Extension methods for QnA. | ||
| /// </summary> | ||
| public static class QnAMakerExtensions |
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.
How is this related to the issue associated with this PR?
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 have splitted this PR into two new PRs.
| /// <param name="qnaRegion">qnaRegion.</param> | ||
| /// <param name="environment">enviroment.</param> | ||
| /// <returns>Modified configuration builder.</returns> | ||
| public static IConfigurationBuilder UseQnAMakerSettings(this IConfigurationBuilder builder, string botRoot, string qnaRegion, string environment) |
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 don't have a lot of context on this approach, but if this is trying to be similar to LuisExtensions, why doesn't it have the same arguments? shouldn't the look and work the same?
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.
We do not want to revise the existing luis extension. But we hope to set the default values for qna maker extension in testbot.json.
| | ||
| var instance = new JArray(); | ||
| instance.Add(JObject.FromObject(topAnswer)); | ||
| var data = JObject.FromObject(topAnswer); |
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.
Need unit tests for this code.
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 have added the unit tests.
Fixes #4227
Add unit tests for QnAMakerExtensions.