Examples - Batch
레이블이 지정된 예제 발화의 일괄 처리를 애플리케이션 버전에 추가합니다.
POST {Endpoint}/luis/api/v2.0/apps/{appId}/versions/{versionId}/examples
URI 매개 변수
| Name | In(다음 안에) | 필수 | 형식 | Description |
|---|---|---|---|---|
|
app
|
path | True |
string (uuid) |
애플리케이션 ID입니다. |
|
Endpoint
|
path | True |
string |
지원되는 Cognitive Services 엔드포인트(프로토콜 및 호스트 이름( 예: https://westus.api.cognitive.microsoft.com). |
|
version
|
path | True |
string |
버전 ID입니다. |
요청 헤더
| Name | 필수 | 형식 | Description |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | True |
string |
요청 본문
| Name | 형식 | Description |
|---|---|---|
| exampleLabelObjectArray |
예제 발화의 배열입니다. |
응답
| Name | 형식 | Description |
|---|---|---|
| 201 Created |
레이블이 지정된 예제 발화가 성공적으로 추가되었는지 확인하는 문자열 배열입니다. |
|
| Other Status Codes |
요청이 부분적으로 성공했음을 나타냅니다. 응답에는 레이블이 지정된 각 예제 발화의 상태를 나타내는 문자열 배열이 포함되어 있습니다. |
|
| Other Status Codes |
오류 응답입니다. |
보안
Ocp-Apim-Subscription-Key
형식:
apiKey
In(다음 안에):
header
예제
Successful Batch Add Labels request
샘플 요청
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"
}
]
샘플 응답
[
{
"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
}
]
정의
| Name | Description |
|---|---|
|
Batch |
레이블이 지정된 예제 발화의 일괄 처리를 추가할 때 응답합니다. |
|
Entity |
예제 내에서 추출된 엔터티의 엔터티 형식 및 위치를 정의합니다. |
|
Error |
API에서 작업을 호출할 때 오류 응답입니다. |
|
Example |
레이블이 지정된 예제 발화입니다. |
|
Label |
레이블이 지정된 예제 발화를 추가할 때 응답합니다. |
|
Operation |
작업 상태의 응답입니다. |
|
Operation |
상태 코드입니다. |
BatchLabelExample
레이블이 지정된 예제 발화의 일괄 처리를 추가할 때 응답합니다.
| Name | 형식 | Description |
|---|---|---|
| error |
작업 상태의 응답입니다. |
|
| hasError |
boolean |
|
| value |
레이블이 지정된 예제 발화를 추가할 때 응답합니다. |
EntityLabelObject
예제 내에서 추출된 엔터티의 엔터티 형식 및 위치를 정의합니다.
| Name | 형식 | Description |
|---|---|---|
| endCharIndex |
integer |
추출된 엔터티가 끝나는 발화 내의 인덱스입니다. |
| entityName |
string |
엔터티 형식입니다. |
| role |
string |
발화 내에서 엔터티의 역할입니다. |
| startCharIndex |
integer |
추출된 엔터티가 시작되는 발화 내의 인덱스입니다. |
ErrorResponse
API에서 작업을 호출할 때 오류 응답입니다.
| Name | 형식 | Description |
|---|---|---|
| errorType |
string |
ExampleLabelObject
레이블이 지정된 예제 발화입니다.
| Name | 형식 | Description |
|---|---|---|
| entityLabels |
예제 발화 내에서 식별된 엔터티입니다. |
|
| intentName |
string |
예제 발화를 나타내는 식별된 의도입니다. |
| text |
string |
발화 예제입니다. |
LabelExampleResponse
레이블이 지정된 예제 발화를 추가할 때 응답합니다.
| Name | 형식 | Description |
|---|---|---|
| ExampleId |
integer (int64) |
새로 만든 예제 ID입니다. |
| UtteranceText |
string |
발화 예제입니다. |
OperationStatus
작업 상태의 응답입니다.
| Name | 형식 | Description |
|---|---|---|
| code |
상태 코드입니다. |
|
| message |
string |
상태 세부 정보입니다. |
OperationStatusType
상태 코드입니다.
| 값 | Description |
|---|---|
| Failed | |
| FAILED | |
| Success |