Examples - Batch
Aggiunge un batch di espressioni di esempio etichettate a una versione dell'applicazione.
POST {Endpoint}/luis/api/v2.0/apps/{appId}/versions/{versionId}/examples
Parametri dell'URI
Nome | In | Necessario | Tipo | Descrizione |
---|---|---|---|---|
app
|
path | True |
string (uuid) |
ID applicazione. |
Endpoint
|
path | True |
string |
Endpoint di Servizi cognitivi supportati (protocollo e nome host, ad esempio: https://westus.api.cognitive.microsoft.com). |
version
|
path | True |
string |
ID versione. |
Intestazione della richiesta
Nome | Necessario | Tipo | Descrizione |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
Corpo della richiesta
Nome | Tipo | Descrizione |
---|---|---|
exampleLabelObjectArray |
Matrice di espressioni di esempio. |
Risposte
Nome | Tipo | Descrizione |
---|---|---|
201 Created |
Matrice di stringhe che determina quali espressioni di esempio etichettate sono state aggiunte correttamente. |
|
Other Status Codes |
Indica che la richiesta ha avuto esito positivo parzialmente. La risposta contiene una matrice di stringhe che indica lo stato di ognuna delle espressioni di esempio di esempio aggiunte. |
|
Other Status Codes |
Risposta errore. |
Sicurezza
Ocp-Apim-Subscription-Key
Tipo:
apiKey
In:
header
Esempio
Successful Batch Add Labels request
Esempio di richiesta
POST {Endpoint}/luis/api/v2.0/apps/2370fb9d-7dbc-4898-a361-a742cf290766/versions/0.1/examples
[
{
"text": "whats the weather in seattle?",
"entityLabels": [
{
"entityName": "Place",
"startCharIndex": 21,
"endCharIndex": 29
}
],
"intentName": "WeatherInPlace"
},
{
"text": "whats the weather in buenos aires?",
"entityLabels": [
{
"entityName": "Place",
"startCharIndex": 21,
"endCharIndex": 34
}
],
"intentName": "WeatherInPlace"
}
]
Risposta di esempio
[
{
"value": {
"UtteranceText": "whats the weather in seattle?",
"ExampleId": -728104
},
"hasError": false
},
{
"value": {
"UtteranceText": "whats the weather in buenos aires?",
"ExampleId": -5313943
},
"hasError": false
}
]
[
{
"hasError": true,
"error": {
"code": "FAILED",
"message": "whats the weather in seattle?. Error: The intent classifier InvalidIntent does not exist in the selected application"
}
},
{
"value": {
"UtteranceText": "whats the weather in buenos aires?",
"ExampleId": -5313943
},
"hasError": false
}
]
Definizioni
Nome | Descrizione |
---|---|
Batch |
Risposta quando si aggiunge un batch di espressioni di esempio etichettate. |
Entity |
Definisce il tipo di entità e la posizione dell'entità estratta all'interno dell'esempio. |
Error |
Risposta di errore quando si richiama un'operazione sull'API. |
Example |
Espressione di esempio con etichetta. |
Label |
Risposta quando si aggiunge un'espressione di esempio etichettata. |
Operation |
Risposta di uno stato operazione. |
Operation |
Codice di stato. |
BatchLabelExample
Risposta quando si aggiunge un batch di espressioni di esempio etichettate.
Nome | Tipo | Descrizione |
---|---|---|
error |
Risposta di uno stato operazione. |
|
hasError |
boolean |
|
value |
Risposta quando si aggiunge un'espressione di esempio etichettata. |
EntityLabelObject
Definisce il tipo di entità e la posizione dell'entità estratta all'interno dell'esempio.
Nome | Tipo | Descrizione |
---|---|---|
endCharIndex |
integer |
Indice all'interno dell'espressione in cui termina l'entità estratta. |
entityName |
string |
Tipo di entità. |
role |
string |
Ruolo dell'entità all'interno dell'espressione. |
startCharIndex |
integer |
Indice all'interno dell'espressione in cui inizia l'entità estratta. |
ErrorResponse
Risposta di errore quando si richiama un'operazione sull'API.
Nome | Tipo | Descrizione |
---|---|---|
errorType |
string |
ExampleLabelObject
Espressione di esempio con etichetta.
Nome | Tipo | Descrizione |
---|---|---|
entityLabels |
Entità identificate all'interno dell'espressione di esempio. |
|
intentName |
string |
Finalità identificata che rappresenta l'espressione di esempio. |
text |
string |
Espressione di esempio. |
LabelExampleResponse
Risposta quando si aggiunge un'espressione di esempio etichettata.
Nome | Tipo | Descrizione |
---|---|---|
ExampleId |
integer (int64) |
ID di esempio appena creato. |
UtteranceText |
string |
Espressione di esempio. |
OperationStatus
Risposta di uno stato operazione.
Nome | Tipo | Descrizione |
---|---|---|
code |
Codice di stato. |
|
message |
string |
Dettagli sullo stato. |
OperationStatusType
Codice di stato.
Valore | Descrizione |
---|---|
FAILED | |
Failed | |
Success |