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

lg:analyze should allow passing in information about external functions #1220

Closed
chrimc62 opened this issue Apr 26, 2021 · 0 comments · Fixed by #1237
Closed

lg:analyze should allow passing in information about external functions #1220

chrimc62 opened this issue Apr 26, 2021 · 0 comments · Fixed by #1237
Labels
Area: LG Language generation issues needs-triage The issue has just been created and it has not been reviewed by the team.

Comments

@chrimc62
Copy link
Contributor

Is your feature request related to a problem? Please describe.
If you write your own expressions in code you can register and use them in LG templates. When running lg:analyze it will fail because it does not have the code registrations. A good example of this is found in form generation where there are two custom functions that are used.

C:\Users\chrimc\source\repos\botbuilder-samples\experimental\generation\generator\packages\library\templates>bf lg:analyze --in standard
[Error] C:\Users\chrimc\source\repos\botbuilder-samples\experimental\generation\generator\packages\library\templates\generator.lg line 455:0 - line 455:129: Error occurred when parsing expression 'substitutions(
    `form-operations.${locale}.data`,
    substitutionScope(utterances, entityValues(values), label),
    5)'. substitutions does not have an evaluator, it's not a built-in function or a custom function.
[Error] C:\Users\chrimc\source\repos\botbuilder-samples\experimental\generation\generator\packages\library\templates\generator.lg line 555:6 - line 555:26: Error occurred when parsing expression 'phrases(property)'. phrases does not have an evaluator, it's not a built-in function or a custom function.

Describe the solution you'd like
You should be able to pass in the list of external functions as an argument.

Describe alternatives you've considered
A flag to prevent an error would not be as good, but would be OK.

[enhancement]

@chrimc62 chrimc62 added Area: LG Language generation issues needs-triage The issue has just been created and it has not been reviewed by the team. labels Apr 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: LG Language generation issues needs-triage The issue has just been created and it has not been reviewed by the team.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant