Examples - Batch
Fügt einer Version der Anwendung einen Batch mit beschrifteten Beispielen hinzu.
POST {Endpoint}/luis/api/v2.0/apps/{appId}/versions/{versionId}/examples
URI-Parameter
Name | In | Erforderlich | Typ | Beschreibung |
---|---|---|---|---|
app
|
path | True |
string (uuid) |
Die Anwendungs-ID. |
Endpoint
|
path | True |
string |
Unterstützte Cognitive Services-Endpunkte (Protokoll und Hostname, z. B. https://westus.api.cognitive.microsoft.com). |
version
|
path | True |
string |
Die Versions-ID. |
Anforderungsheader
Name | Erforderlich | Typ | Beschreibung |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
Anforderungstext
Name | Typ | Beschreibung |
---|---|---|
exampleLabelObjectArray |
Array von Beispiel-Äußerungen. |
Antworten
Name | Typ | Beschreibung |
---|---|---|
201 Created |
Ein Zeichenfolgenarray, das bestimmt, welche Beschriftungsbeispiele erfolgreich hinzugefügt wurden. |
|
Other Status Codes |
Gibt an, dass die Anforderung teilweise erfolgreich war. Die Antwort enthält ein Zeichenfolgenarray, das den Status jedes hinzugefügten beschrifteten Beispiels angibt. |
|
Other Status Codes |
Fehlerantwort. |
Sicherheit
Ocp-Apim-Subscription-Key
Typ:
apiKey
In:
header
Beispiele
Successful Batch Add Labels request
Beispielanforderung
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"
}
]
Beispiel für eine Antwort
[
{
"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
}
]
Definitionen
Name | Beschreibung |
---|---|
Batch |
Antwort beim Hinzufügen eines Batches mit beschrifteten Beispieltexten. |
Entity |
Definiert den Entitätstyp und die Position der extrahierten Entität im Beispiel. |
Error |
Fehlerantwort beim Aufrufen eines Vorgangs in der API. |
Example |
Ein beschriftetes Beispiel für die Äußerung. |
Label |
Antwort beim Hinzufügen einer beschrifteten Beispiel-Äußerung. |
Operation |
Antwort eines Vorgangsstatus. |
Operation |
Statuscode. |
BatchLabelExample
Antwort beim Hinzufügen eines Batches mit beschrifteten Beispieltexten.
Name | Typ | Beschreibung |
---|---|---|
error |
Antwort eines Vorgangsstatus. |
|
hasError |
boolean |
|
value |
Antwort beim Hinzufügen einer beschrifteten Beispiel-Äußerung. |
EntityLabelObject
Definiert den Entitätstyp und die Position der extrahierten Entität im Beispiel.
Name | Typ | Beschreibung |
---|---|---|
endCharIndex |
integer |
Der Index innerhalb der Äußerung, in der die extrahierte Entität endet. |
entityName |
string |
Der Entitätstyp. |
role |
string |
Die Rolle der Entität innerhalb der Äußerung. |
startCharIndex |
integer |
Der Index innerhalb der Äußerung, in der die extrahierte Entität beginnt. |
ErrorResponse
Fehlerantwort beim Aufrufen eines Vorgangs in der API.
Name | Typ | Beschreibung |
---|---|---|
errorType |
string |
ExampleLabelObject
Ein beschriftetes Beispiel für die Äußerung.
Name | Typ | Beschreibung |
---|---|---|
entityLabels |
Die identifizierten Entitäten innerhalb der Beispiel-Äußerung. |
|
intentName |
string |
Die identifizierte Absicht, die die Beispiel-Äußerung darstellt. |
text |
string |
Die Beispiel-Äußerung. |
LabelExampleResponse
Antwort beim Hinzufügen einer beschrifteten Beispiel-Äußerung.
Name | Typ | Beschreibung |
---|---|---|
ExampleId |
integer (int64) |
Die neu erstellte Beispiel-ID. |
UtteranceText |
string |
Die Beispiel-Äußerung. |
OperationStatus
Antwort eines Vorgangsstatus.
Name | Typ | Beschreibung |
---|---|---|
code |
Statuscode. |
|
message |
string |
Statusdetails. |
OperationStatusType
Statuscode.
Wert | Beschreibung |
---|---|
FAILED | |
Failed | |
Success |