Model - List Intent Suggestions
Sugere expressões de exemplo que melhorariam a precisão do modelo de intenção em uma versão do aplicativo.
GET {Endpoint}/luis/api/v2.0/apps/{appId}/versions/{versionId}/intents/{intentId}/suggest
GET {Endpoint}/luis/api/v2.0/apps/{appId}/versions/{versionId}/intents/{intentId}/suggest?take={take}
Parâmetros do URI
Name | Em | Necessário | Tipo | Description |
---|---|---|---|---|
app
|
path | True |
string (uuid) |
O ID do aplicativo. |
Endpoint
|
path | True |
string |
Pontos de extremidade de Serviços Cognitivos suportados (protocolo e nome do host, por exemplo: https://westus.api.cognitive.microsoft.com). |
intent
|
path | True |
string (uuid) |
O ID do classificador de intenção. |
version
|
path | True |
string |
O ID da versão. |
take
|
query |
integer minimum: 0maximum: 500 |
O número de entradas a devolver. O tamanho máximo da página é 500. O padrão é 100. |
Cabeçalho do Pedido
Name | Necessário | Tipo | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
Respostas
Name | Tipo | Description |
---|---|---|
200 OK |
Se não houver um modelo de intenção treinado, nada será retornado na resposta. Se houver um modelo treinado e a aprendizagem ativa encontrar consultas relevantes, elas serão retornadas com as previsões do modelo de intenção. Se houver um modelo treinado, mas a aprendizagem ativa não encontrou nenhuma consulta relevante, uma lista vazia será retornada na resposta. |
|
Other Status Codes |
Resposta de erro. |
Segurança
Ocp-Apim-Subscription-Key
Tipo:
apiKey
Em:
header
Exemplos
Successful Get Intents Suggestion Examples
Pedido de amostra
GET {Endpoint}/luis/api/v2.0/apps/86226c53-b7a6-416f-876b-226b2b5ab07b/versions/0.1/intents/3d73462d-98f0-4dcd-8d30-fab9e65f2e73/suggest
Resposta da amostra
[
{
"text": "hey",
"tokenizedText": [
"hey"
],
"intentPredictions": [
{
"name": "None",
"score": 0.65
},
{
"name": "FindAirportByCode",
"score": 0.02
},
{
"name": "WeatherInPlace",
"score": 0.01
},
{
"name": "TimeInPlace",
"score": 0
},
{
"name": "FindHotels-ChangeLocation",
"score": 0
},
{
"name": "FindHotels",
"score": 0
}
],
"entityPredictions": []
},
{
"text": "2-2-2017",
"tokenizedText": [
"2",
"-",
"2",
"-",
"2017"
],
"intentPredictions": [
{
"name": "None",
"score": 0.88
},
{
"name": "TimeInPlace",
"score": 0
},
{
"name": "FindAirportByCode",
"score": 0
},
{
"name": "FindHotels-ChangeLocation",
"score": 0
},
{
"name": "FindHotels",
"score": 0
},
{
"name": "WeatherInPlace",
"score": 0
}
],
"entityPredictions": [
{
"entityName": "datetime",
"startTokenIndex": 0,
"endTokenIndex": 4,
"phrase": "2-2-2017"
}
]
},
{
"text": "maybe find me an airport first",
"tokenizedText": [
"maybe",
"find",
"me",
"an",
"airport",
"first"
],
"intentPredictions": [
{
"name": "FindAirportByCode",
"score": 0.99
},
{
"name": "FindHotels",
"score": 0.01
},
{
"name": "TimeInPlace",
"score": 0
},
{
"name": "None",
"score": 0
},
{
"name": "FindHotels-ChangeLocation",
"score": 0
},
{
"name": "WeatherInPlace",
"score": 0
}
],
"entityPredictions": []
},
{
"text": "as",
"tokenizedText": [
"as"
],
"intentPredictions": [
{
"name": "None",
"score": 0.98
},
{
"name": "FindAirportByCode",
"score": 0.01
},
{
"name": "WeatherInPlace",
"score": 0.01
},
{
"name": "TimeInPlace",
"score": 0
},
{
"name": "FindHotels-ChangeLocation",
"score": 0
},
{
"name": "FindHotels",
"score": 0
}
],
"entityPredictions": []
},
{
"text": "find hotel in barcelona",
"tokenizedText": [
"find",
"hotel",
"in",
"barcelona"
],
"intentPredictions": [
{
"name": "FindHotels",
"score": 1
},
{
"name": "TimeInPlace",
"score": 0
},
{
"name": "None",
"score": 0
},
{
"name": "FindAirportByCode",
"score": 0
},
{
"name": "FindHotels-ChangeLocation",
"score": 0
},
{
"name": "WeatherInPlace",
"score": 0
}
],
"entityPredictions": [
{
"entityName": "Renamed Entity",
"startTokenIndex": 3,
"endTokenIndex": 3,
"phrase": "barcelona"
},
{
"entityName": "geography",
"startTokenIndex": 3,
"endTokenIndex": 3,
"phrase": "barcelona"
}
]
}
]
Definições
Name | Description |
---|---|
Entity |
Uma entidade sugerida. |
Error |
Resposta de erro ao invocar uma operação na API. |
Intent |
Uma intenção sugerida. |
Intents |
Intenção prevista/sugerida. |
EntityPrediction
Uma entidade sugerida.
Name | Tipo | Description |
---|---|---|
endTokenIndex |
integer |
O índice dentro do enunciado onde termina a entidade extraída. |
entityName |
string |
O nome da entidade |
phrase |
string |
O(s) token(s) real(is) que compõe(m) a entidade. |
startTokenIndex |
integer |
O índice dentro do enunciado onde a entidade extraída começa. |
ErrorResponse
Resposta de erro ao invocar uma operação na API.
Name | Tipo | Description |
---|---|---|
errorType |
string |
IntentPrediction
Uma intenção sugerida.
Name | Tipo | Description |
---|---|---|
name |
string |
O nome da intenção |
score |
number |
A pontuação da intenção, baseada no modelo de previsão. |
IntentsSuggestionExample
Intenção prevista/sugerida.
Name | Tipo | Description |
---|---|---|
entityPredictions |
Entidades previstas/sugeridas. |
|
intentPredictions |
Intenções previstas/sugeridas. |
|
text |
string |
O enunciado. Por exemplo, "Como é o tempo em Seattle?" |
tokenizedText |
string[] |
O enunciado tokenizado. |