【问题标题】: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
]

我错过了什么?

【问题讨论】:

    标签: botframework adaptive-cards adaptive-dialogs


    【解决方案1】:

    fromFilenow disabled by default。您可以更改设置 Microsoft.Bot.Builder.LanguageGeneration.Templates 类的值:

    Templates.EnableFromFile = true;

    【讨论】:

    猜你喜欢
    • 2020-11-16
    • 1970-01-01
    • 2021-01-17
    • 2022-11-27
    • 2020-07-26
    • 2018-07-01
    • 1970-01-01
    • 1970-01-01
    • 2023-01-12
    相关资源
    最近更新 更多