Skip to content
This repository has been archived by the owner on Jun 28, 2023. It is now read-only.

[Adaptive] [LG] Create tooling to auto generate LG Template constants from LG files #1235

Open
DingmaomaoBJTU opened this issue Jul 31, 2019 · 2 comments
Assignees
Labels

Comments

@DingmaomaoBJTU
Copy link

Github issues should be used for bugs and feature requests. Use Stack Overflow for general "how-to" questions.

Version

4.6.0-Daily-2019-07-17-01

Describe the bug

While using LG template in legacy dialogs like waterfall dialogs, incorrect/missing template name
could only be found in runtime which is a little bit suffer.

Except:
Have an indicator generator in VS Extension/VSCode Extension to generate all available template name list like this:
image

With this indicator, developers can easily refer the template name instead of hardcoded strings to reduce runtime error.

To Reproduce

Currently this is how we call LG in waterfall:
var result = await lgMultiLangEngine.Generate(turnContext, "[CancellingMessage]", null);

The [CancellingMessage] is a hardcoded string and can be easily misspelled. The code style with so many hardcoded strings is bad and when the template name is changed, it is easy to generate runtime error everywhere.

Expected behavior

Have a generator to help generate an indicator for a target LG file. And use LG like this:
var result = await lgMultiLangEngine.Generate(turnContext, SendEmailResponses.CancellingMessage , null);

@tomlm
Copy link
Contributor

tomlm commented Aug 1, 2019

Ah, like LUISGen...auto generate a language binding string for all template names..

@tomlm tomlm changed the title [Adaptive] [LG] Support LG template name indicator to translate LG run time error to compile error [Adaptive] [LG] Create tooling to auto generate LG Template constnats from LG files Aug 1, 2019
@tomlm tomlm changed the title [Adaptive] [LG] Create tooling to auto generate LG Template constnats from LG files [Adaptive] [LG] Create tooling to auto generate LG Template constants from LG files Aug 1, 2019
@tomlm tomlm transferred this issue from microsoft/botbuilder-dotnet Aug 1, 2019
@vishwacsena
Copy link
Contributor

@boydc2014 - in a spirit similar to LUISGen, we should consider adding this capability to the MSLG CLI - ability to generate a C#/ TS/ JS variants.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants