Is there an official LUIS API that returns the tot

2019-09-20 00:56发布

问题:

I noticed the LUIS portal (www.luis.ai) shows Intents with the total number of Utterances for each. I'm looking to build a similar page in my application, although Microsoft's published APIs don't have a method that returns the total utterances per intent.

We noticed the LUIS dashboard is using this API to pull the data, but the method is not published in their docs: https://westus.api.cognitive.microsoft.com/luis/webapi/v2.0/apps/{appId}/versions/{version}/stats/labelsperintent

Does anyone know whether this is an official API that can be used? We don't want to use it and then Microsoft makes changes to it later which could break our code.

回答1:

The endpoint you discovered is not an official API. Notice that it's luis/webapi/v2.0 instead of luis/api/v2.0. You can use it, but like you said you run the risk of it changing later.

I recommend using the example utterances - Review labeled examples API: https://[location].api.cognitive.microsoft.com/luis/api/v2.0/apps/{appId}/versions/{versionId}/examples[?skip][&take]. You would just need to query the data yourself to see the utterance count for each intent.