Well, it is over.
Cortana is dead.
In February, Microsoft killed third party skills. Though you can skill invoke the bots, the interface from Windows or Invoke is dead.
So the question is ... now what. Relaunch the skills I have as plug ins for Teams chat? Or just wait... continue to build on Google Actions.
Update: I spent 5 minutes and hooked the bot webchat to the Art of War and Mediations pages. So... at least you can still see the botframework part in action!
Retrogaming, Single Boards, Natural Language Processing, Computer Programming, Software Engineering
Showing posts with label #skills. Show all posts
Showing posts with label #skills. Show all posts
Saturday, 18 April 2020
Tuesday, 22 October 2019
Media, White Hats, and Black Hats
ARS Technica has an article with detailed instructions on how to record information, or fake phishing, using Alexa and Google Assistant. It is a blueprint of how to build rogue skills that pass certification but do naughty things. I know at Microsoft, one of the last things Cortana did was implement developer vetting. It irritates me that articles like this, that have good intentions, not only expose holes to black hats, but make real developers lives harder.
Thursday, 21 March 2019
90 day new user estimates
Looking at how many users on Google or Microsoft are using my skills.
| Microsoft | ||
| Art of War | 23 | 540 |
| Safety Moments | 54 | 101 |
| Meditations | 12 | 67 |
| Ambient Sounds | 65 | |
| AutoMate | 5 |
Art of War wins on Google. Ambient Sounds wins on Microsoft. And hey, for all this effort, at least Google is sending me a T-Shirt. I suspect Colossal Cave will beat them all...
Google tells me on average 15 new users a day try Art of War.
Thursday, 28 February 2019
Cortana Hosting Off Azure
Yesterday I decided to start moving my skills off Azure. Messaging is still handled by bot service, but the bot lives elsewhere. This is in no way a comment on Azure App Services. It has everything to do with me paying for a GoDaddy VM and I want to have everything in one place. Sure, its not scalable in its current form, but who cares when you have insignificant TPS.
The things that Azure App Services give you for free... a SSL certificate so you can use HTTPS (that you must for bots messaging) and a preconfigured IIS web server that is always managed (because its a container). But its the free tier restrictions... you can't set your web app and skill to "always on", so you get unloaded every 20 minutes. That means your skill will timeout when invoked, and that's a really crappy experience. I wonder how many people actually try a skill twice after it craters the first time? You also can't use web jobs to tickle the endpoint.
So, first step, install Apache. In hindsight, I should have paid GoDaddy the managed fee (that was reasonable, $50 or so) to configure Apache - with their bundled 509 Cert. What a pain... I don't miss running my own web servers.
Why run Apache? Because you want the web server to take care of the SSL for you. It is a lot of work to build a bot supporting HTTPS without a web server. So the trick is, get Apache to handle the secure request, and then tunnel it via proxy to a port without SSL.My node.js bots - they don't know anything about SSL.
How to have all my bots run in one place? Multiple proxies that redirect based on different paths. Instead of https://myserver/api/messages, we now have http://myserver/mybot/api/messages. And the latter redirects to different local ports via a proxy to http://localhost:3000/mybot/api/messages.
Then you have a choice of registering the Cortana skill via a Bot Channel Registration (the right way), or swap out the endpoint after creating a Web App Bot. Why would you want to do the latter? Updated: Because there is a bug in Bot Channel Registrations. Do not use Bot Channel Registration until the glitch is fixed. Create a web app bot, configure the Cortana channel, and then change the bots end point (and tombstone the Azure app service).
I will add my web.conf here when I have time. It is magic that I'll never remember. And the next trick is running node as a daemon. My VM is running Ubuntu server - so
bash -c 'nohup node app &>/dev/null & jobs -p %1'
The things that Azure App Services give you for free... a SSL certificate so you can use HTTPS (that you must for bots messaging) and a preconfigured IIS web server that is always managed (because its a container). But its the free tier restrictions... you can't set your web app and skill to "always on", so you get unloaded every 20 minutes. That means your skill will timeout when invoked, and that's a really crappy experience. I wonder how many people actually try a skill twice after it craters the first time? You also can't use web jobs to tickle the endpoint.
So, first step, install Apache. In hindsight, I should have paid GoDaddy the managed fee (that was reasonable, $50 or so) to configure Apache - with their bundled 509 Cert. What a pain... I don't miss running my own web servers.
Why run Apache? Because you want the web server to take care of the SSL for you. It is a lot of work to build a bot supporting HTTPS without a web server. So the trick is, get Apache to handle the secure request, and then tunnel it via proxy to a port without SSL.My node.js bots - they don't know anything about SSL.
How to have all my bots run in one place? Multiple proxies that redirect based on different paths. Instead of https://myserver/api/messages, we now have http://myserver/mybot/api/messages. And the latter redirects to different local ports via a proxy to http://localhost:3000/mybot/api/messages.
Then you have a choice of registering the Cortana skill via a Bot Channel Registration (the right way), or swap out the endpoint after creating a Web App Bot. Why would you want to do the latter? Updated: Because there is a bug in Bot Channel Registrations. Do not use Bot Channel Registration until the glitch is fixed. Create a web app bot, configure the Cortana channel, and then change the bots end point (and tombstone the Azure app service).
I will add my web.conf here when I have time. It is magic that I'll never remember. And the next trick is running node as a daemon. My VM is running Ubuntu server - so
bash -c 'nohup node app &>/dev/null & jobs -p %1'
Tuesday, 22 January 2019
Cortana Availability
Ever notice that it can take two invocations to a Cortana skill to get it to work on Azure?
This is because resources are unloaded if they are idle for 20 minutes. The first invocation; you need to wait for the resources (web app service) to load. You can change this in basic and standard service plans by changing the app service’s settings to “Always On”.
But if you are using a free tier, what do you do? Set up an availability test that pings your web server every 15 minutes via an Azure web job or Azure monitor.
But be aware: keeping resources live can consume your credits!
Monday, 16 July 2018
End to End Developer example video of basic Cortana skill
For those wanting a visual walk through of the process to create a Cortana skill with botframework!
Uses node.js.
Labels:
#ai,
#azure,
#botframework,
#coding,
#cortana,
#development,
#skills
Friday, 13 July 2018
Get your Azure QnA Bot to Speak with Cortana
Building a QnA bot and hooking it up to Cortana is simple in node.js under BotFramework V3.
If you have a FAQ that is in Q: A: format you can import it via the Azure QnA Maker tools and auto-create a "knowledge base". No coding required. You can do this here https://www.qnamaker.ai.
The next step is creating your bot. Microsoft has standardized on their botframework to do this. https://dev.botframework.com is your gateway.
If you are like me and like the simplicity of node.js then pick the QnA template.
Then go back to the Azure portal and update your bot for the Application Settings blade sections shown here.
The test web app will now be successfully linked to your QnA bot! But don't forget the last step...
Go to your Channels blade and set up Cortana. Then, go to the build blade and open the online editor. In the app.js code, you will see that the template uses the standard QnA dialog builder - that does not say the resulting answers back with the Cortana speech channel. Add an override like this.
(See GitHub QnAMaker patch for a V4 node example.)
There you have it. Now "Hey Cortana, ask Bernie Question Bot Test what is a dwarf planet?"
For C#, it is slightly more complicated. You need to subclass the the BasicQnAMakerDialog with something that sends a message with speak attached. This is done as an inner class of RootDialog (from the V3 C# template that comes with Azure Web App Bots.
// Dialog for QnAMaker GA service
[Serializable]
public class BasicQnAMakerDialog : QnAMakerDialog
{
// Go to https://qnamaker.ai and feed data, train & publish your QnA Knowledgebase.
// Parameters to QnAMakerService are:
// Required: qnaAuthKey, knowledgebaseId, endpointHostName
// Optional: defaultMessage, scoreThreshold[Range 0.0 – 1.0]
public BasicQnAMakerDialog() : base(new QnAMakerService(new QnAMakerAttribute(RootDialog.qnaAuthKey, RootDialog.qnaKBId, "No good match in FAQ.", 0.5, 1, RootDialog.endpointHostName)))
{ }
// Override to also include the knowledgebase question with the answer on confident matches
protected override async Task RespondFromQnAMakerResultAsync(IDialogContext context, IMessageActivity message, QnAMakerResults results)
{
if (results.Answers.Count > 0)
{
IMessageActivity response = context.MakeMessage();
response.Text = "Here is the match from FAQ: \r\n Q: " + results.Answers[0].Questions[0] + " \r\n A: " + results.Answers[0].Answer;
response.Speak = response.Text;
response.InputHint = "acceptingInput";
await context.PostAsync(response);
}
}
}
(See GitHub QnAMaker patch for a V4 C# example.)
Subscribe to:
Posts (Atom)