你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Examples - Add
Adds a labeled example utterance in a version of the application.
POST {Endpoint}/luis/authoring/v3.0-preview/apps/{appId}/versions/{versionId}/example
POST {Endpoint}/luis/authoring/v3.0-preview/apps/{appId}/versions/{versionId}/example?enableNestedChildren={enableNestedChildren}
Name | In | Required | Type | Description |
---|---|---|---|---|
app
|
path | True |
string uuid |
The application ID. |
Endpoint
|
path | True |
string |
Supported Cognitive Services endpoints (protocol and hostname, for example: https://westus.api.cognitive.microsoft.com). |
version
|
path | True |
string |
The version ID. |
enable
|
query |
boolean |
Toggles nested/flat format |
Name | Required | Type | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
Name | Type | Description |
---|---|---|
entityLabels |
The identified entities within the example utterance. |
|
intentName |
string |
The identified intent representing the example utterance. |
text |
string |
The example utterance. |
Name | Type | Description |
---|---|---|
201 Created |
The ID of the created example utterance. |
|
Other Status Codes |
Error Response. |
Type:
apiKey
In:
header
Sample request
POST {Endpoint}/luis/authoring/v3.0-preview/apps/86226c53-b7a6-416f-876b-226b2b5ab07b/versions/0.1/example?enableNestedChildren=False
{
"text": "whats the weather in buenos aires?",
"intentName": "WeatherInPlace",
"entityLabels": [
{
"entityName": "Place",
"startCharIndex": 21,
"endCharIndex": 34
}
]
}
Sample response
{
"UtteranceText": "whats the weather in buenos aires?",
"ExampleId": -11
}
Name | Description |
---|---|
Entity |
Defines the entity type and position of the extracted entity within the example. |
Error |
Error response when invoking an operation on the API. |
Example |
A labeled example utterance. |
Label |
Response when adding a labeled example utterance. |
Defines the entity type and position of the extracted entity within the example.
Name | Type | Description |
---|---|---|
children |
The identified entities within the example utterance. |
|
endCharIndex |
integer |
The index within the utterance where the extracted entity ends. |
entityName |
string |
The entity type. |
role |
string |
The role the entity plays in the utterance. |
startCharIndex |
integer |
The index within the utterance where the extracted entity starts. |
Error response when invoking an operation on the API.
Name | Type | Description |
---|---|---|
errorType |
string |
A labeled example utterance.
Name | Type | Description |
---|---|---|
entityLabels |
The identified entities within the example utterance. |
|
intentName |
string |
The identified intent representing the example utterance. |
text |
string |
The example utterance. |
Response when adding a labeled example utterance.
Name | Type | Description |
---|---|---|
ExampleId |
integer |
The newly created example ID. |
UtteranceText |
string |
The example utterance. |