Declarative adaptive dialog not working with LUIS Recognizer

382 Views Asked by At

I am using Declarative adaptive dialog for our chatbot. I tired including the recognizer as LUIS in my .dialog file. But i am getting Type Microsoft.LuisRecognizer not registered in factory error while execution. I am doing with the following steps in my declarative files.

Created below 4 declarative files. Test.lu

enter image description here

Created trained and publish the LUIS app in LUIS portal.

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..."
}
]
}
]
}

I am loading the required dialog file in my class, but still getting the above mentioned error. Kindly help me in solving the issue.

1

There are 1 best solutions below

0
On

You can refer to this samples for Adaptive Dialog(Rich compositional dialog with events, flows, slot filling, and ambiguity resolution).

The SDK defines a declarative file for reasoning called .dialog files. .Dialog files allow you to define the logic of your app without having to write code. .Dialog stores the configuration of any object in the system in an open-ended and extensible way, and these definitions can be reused as if they were custom code. All components in the SDK and components provided by 3rd party libraries can be authored via .dialog files providing a rich ability to compose and extend the system.

https://learn.microsoft.com/en-us/azure/bot-service/bot-builder-concept-adaptive-dialog-recognizers?view=azure-bot-service-4.0#luis-recognizer