Question answering in Azure Cognitive Service For Language provides cloud-based Natural Language Processing (NLP) that allows you to create a natural conversational layer over your data. And it replaced Azure QnA Maker service since 1st Oct, 2022.
With Question Answering, developers can quickly create a bot in Azure by following this guide . However some developers noticed that this bot cannot be used as Skill Bot, for example, after taking below steps skill bot still return 401 errors to the root bot,
Create empty root bot in Composer
Generate and deploy a bot from Custom Question Answering project in Azure Language Service portal
6. Add root bot app id to allowedCallers field in appsettings.json under the skill bot project
7. Test skill bot trigger locally in root bot, hits the 401 error
The reason of this problem is the created bot from Language service uses a root bot pattern, which doesn’t include the authentication and error handling requirement for a typical skill bot.
To solve it, need to refer this article Implement a skill - Bot Service , and take below steps. In this article, I name the language service created bot as newqna01-bot, which will be our remote skill bot. Before starting, make sure we created a simple skill manifest for the skill bot, and import it to the root bot in Bot Composer as above.
Modify the skill bot project
Download the project code from newqna01-bot web service. (Not sure if you did this before, my method is: visit https://<newqna01-bot>.scm.azurewebsites.net/ , click Debug Console -> CMD, open Site folder, find wwwroot, download the whole content of wwwroot). The project name is QnABot. We can open its solution file in Visual Studio 2022:
Note: In the bot composer, “skillHostEndpoint” will be autoset to the real azure root bot web app link on azure side during publishing. Means the local skillHostEndpoint config is still the ngrok setting, while the same time azure side skillHostEndpoint is azure root bot app link.