Alejandro Peña
Alejandro Peña

Reputation: 131

From free to paid subscription on LUIS

I recently reached the limit for the free LUIS usage. I first created the LUIS app directly on the LUIS.ia portal and used those keys on my code. Now I wanted to get the paid option to continue using it so I created an azure resource for LUIS.ia I then went to the LUIS.ia app and added the azure resource throught the Publish>>Add Key on the LUIS.ia portal. I then changed on my code the subscriptionKey for one of the two from the new keys but it is still not working. What did I do wrong?

Upvotes: 2

Views: 593

Answers (1)

Steven G.
Steven G.

Reputation: 1642

One answer that probably isn't applicable at this time is that it will take time for an Azure resource to successfully propogate throughout Azure. What this means in the case of newly created LUIS Subscription keys, is that it can take up to ten minutes for a newly created LUIS Subscription Key in Azure to be valid to LUIS.

However, the steps you outlined indicate that you might be missing this next part.

After you created the key in Azure, you should have associated the key with the LUIS application you wish to use it with. Following a successful LUIS Subscription Key association in the LUIS Portal with one of your applications, the next step is to continue to your bot's code and change the previous key, to your new key.


Depending on which the error codes you're getting when you try to use LUIS will help with unblocking you.

If you're getting a 401, that means the key you're using is invalid, which might mean either the wrong region, or that the key hasn't finished propagating.

If it's a 403, that usually means you're out of your monthly quota, which would imply that the key being used in your LUIS queries are of the free-tier or is the Authoring/Programmatic API Key, so the key needs to be replaced with your paid-tier LUIS Subscription Key.


Edit for BotBuilder .NET v3 users:

For users of the .NET v3 SDK, when instantiating the LuisModel, if you are using a region other than westus, you must pass in the correct domain. An example of this in action can be found here, but I've also included the code below:

[LuisModel("XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX",
    "XXXXXXXXXXXXXXXXX", domain: "eastus2.api.cognitive.microsoft.com")]

Upvotes: 2

Related Questions