为啥我从File not a built-in function in botframework 得到错误
Posted
技术标签:
【中文标题】为啥我从File not a built-in function in botframework 得到错误【英文标题】:Why do I get the error fromFile not a built-in function in botframework为什么我从File not a built-in function in botframework 得到错误 【发布时间】:2022-01-11 23:24:22 【问题描述】:我已经升级到最新版本的botframework并开始报错:
糟糕,好像出了点问题。错误:[错误] D:\home\site\wwwroot\Dialogs\RootDialog\LG\en\RootDialog_en.lg 第 15:2 行 - 第 15:69 行:解析表达式 'json(fromFile('.../.../ Cards/en/OnChooseIntentAdaptiveCard.json'))'。 fromFile 没有求值器,它不是内置函数或自定义函数。
LG 代码:
# AdaptiveCard
[Activity
Attachments = $json(AdaptiveCard.Definition())
]
# AdaptiveCard.Definition
- $json(fromFile('../../Cards/en/OnChooseIntentAdaptiveCard.json'))
# chooseIntentResponseWithCard_en()
[Activity
Attachments = $ActivityAttachment(json(fromFile('../../Cards/en/OnChooseIntentAdaptiveCard.json')), 'adaptiveCard')
]
# Greeting_en()
[Activity
Attachments = $ActivityAttachment(json(fromFile('../../Cards/en/GreetingCard.json')), 'adaptiveCard')
AttachmentLayout = list
]
我错过了什么?
【问题讨论】:
【参考方案1】:fromFile
是 now disabled by default。您可以更改设置 Microsoft.Bot.Builder.LanguageGeneration.Templates 类的值:
Templates.EnableFromFile = true;
【讨论】:
是否有 botframework 版本的更改日志或类似的东西,我们可以在其中跟踪更改? 您可以关注here。您还可以查看分支提交(主要或您感兴趣的任何版本):github.com/microsoft/botbuilder-dotnet/commits/4.15以上是关于为啥我从File not a built-in function in botframework 得到错误的主要内容,如果未能解决你的问题,请参考以下文章
Sql Server Function函数 is not a recognized built-in function name
解决 PHP Interpreter is not configured Please configure PHP Interpreter to use built-in web server(示例代
[Vue warn]: Do not use built-in or reserved HTML elements as component id:
Elasticsearch built-in security features are not enabled去除
为啥这个 javac: File Not Found 错误?
[Vue warn]: Do not use built-in or reserved HTML elements as component id: article