0
votes

Working with the Azure enterprise bot model, everything is deployed, enabled and functioning. But all calls to LUIS are failing in the chatbot, both on desktop and in Azure's web environment. My LUIS model works in luis.ai when testing, but when connecting to LUIS from the bot I get the error below:

The only thing that does not work is the call to LUIS from the chatbot. It returns unauthorized. I've spent about 8 hours on google and verifying settings. Can somebody tell me where the checkbox is that i've missed?

Basic chatbot function is good. microsoft app id and secret are good. QNA maker implementation is good. Publish cycles from Visual Studio is working fine. I have verified the LUIS app functions in luis.ai. I have verified all keys are properly written in cognitivemodels.json I have verified all keys are correct by changing them incrementally, noting that the app fails, restoring to the correct value, and noting that the app functions.

trace results:

App ID: Version: Unknown Slot: Production Recognizer ResultRaw Response { "recognizerResult": { "alteredText": null, "entities": { "$instance": {} }, "intents": { "l_general": { "score": 0.6153312 } }, "text": "test" } } Top-Scoring Intent l_general (0.6153312) Please add your LUIS service to enable reassigning. Entities No Entities

error from emulator log: [LUIS] Unauthorized: Your bot is not configured to interact with LUIS app: . Please connect your bot to LUIS using the services pane.

The service pane appears, I add in all the keys and information as copied from luis.ai for the referenced appID. On save, the pane disappears and nothing changes.

2
Welcome to SO! Could you provide some code of what you attempted? Doing so might lead to more views and a faster answer to your question.technogeek1995

2 Answers

0
votes

This error looks to be specific to the Bot Framework Emulator as per this code.

I can reproduce the error locally by doing the following:

  • Debugging my bot.
  • Submitting a query that will trigger a request to LUIS.
  • Clicking on the hyperlinked trace text next to a LUIS Trace log entry in the log pane.

You aren't actually able to add a service to a bot without creating a bot configuration first (File > New Bot Configuration). Fill out the following:

  • Bot name
  • Endpoint URL (use your local one)
  • Microsoft App ID
  • Microsoft App password
  • Save and connect
  • Save the configuration somewhere

Then you will be able to add the services:

  • Click the + next to the Service.
  • Add your LUIS apps by filling out the dialogs.

Try the steps in the first set of my bullet points again and see if errors come through. If they do then you will need to add a service for the GUID that comes back in the error message - this GUID will match one of your LUIS app ids.

Even after doing this I still got the error message in the Log page, starting the emulator and bot didn't help. So I would advise raising an issue on the official GitHub for the Bot Framework Emulator about adding the services not working.

0
votes

My AD password changed, Powershell had cached my credentials. Although I was not actively using powershell, apparently my credentials are locally cached on the dev box and used for some specific funcitons, which manifests as seemingly random authentication errors in logs. logging out of azure and logging back in (in powershell) resolved the issue.

Oh the hours of my life I will never get back.