【发布时间】:2021-01-12 02:28:06
【问题描述】:
我正在为我们的聊天机器人使用声明式自适应对话框。我厌倦了将识别器作为 LUIS 包含在我的 .dialog 文件中。但是我在执行时收到 Type Microsoft.LuisRecognizer not registered in factory 错误。我正在声明性文件中执行以下步骤。
创建以下 4 个声明性文件。 测试.lu
在 LUIS 门户中创建并发布了经过培训的 LUIS 应用。
Test.lu.dialog
{ "$kind": "Microsoft.MultiLanguageRecognizer", "recognizers": { "en-us": "Test.en-us.lu", "": "Test.en-us.lu" }, "$schema": "../../TestBot.schema" }
Test.en-us.lu.dialog
{
"$kind": "Microsoft.LuisRecognizer",
"applicationId": "my-app-id",
"endpoint": "our endpoint",
"endpointKey": "our key",
"$schema": "../../TestBot.schema"
}
Test.main.dialog
{
"$schema": "../../TestBot.schema",
"$kind": "Microsoft.AdaptiveDialog",
"autoEndDialog": true,
"defaultResultProperty": "dialog.result",
"recognizer" : "Test.lu",
"triggers": [
{
"$kind": "Microsoft.OnIntent",
"intent": "Greeting",
"actions": [
{
"$kind": "Microsoft.SendActivity",
"activity": "Greetings intent!!!"
}
]
},
{
"$kind": "Microsoft.OnIntent",
"intent": "Service",
"actions": [
{
"$kind": "Microsoft.SendActivity",
"activity": "Service intent has been triggered..."
}
]
},
{
"$kind": "Microsoft.OnIntent",
"intent": "Cancel",
"actions": [
{
"$kind": "Microsoft.SendActivity",
"activity": "The cancel intent has been triggered..."
}
]
}
]
}
我正在课堂上加载所需的对话框文件,但仍然出现上述错误。请帮助我解决问题。
【问题讨论】:
标签: c# botframework azure-bot-service adaptive-dialogs