Examples - Batch
アプリケーションのバージョンにラベル付けされた発話の例のバッチを追加します。
POST {Endpoint}/luis/api/v2.0/apps/{appId}/versions/{versionId}/examples
URI パラメーター
| 名前 | / | 必須 | 型 | 説明 |
|---|---|---|---|---|
|
app
|
path | True |
string (uuid) |
アプリケーション ID。 |
|
Endpoint
|
path | True |
string |
サポートされている Cognitive Services エンドポイント (プロトコルとホスト名、例: https://westus.api.cognitive.microsoft.com)。 |
|
version
|
path | True |
string |
バージョン ID。 |
要求ヘッダー
| 名前 | 必須 | 型 | 説明 |
|---|---|---|---|
| Ocp-Apim-Subscription-Key | True |
string |
要求本文
| 名前 | 型 | 説明 |
|---|---|---|
| exampleLabelObjectArray |
発話の例の配列。 |
応答
| 名前 | 型 | 説明 |
|---|---|---|
| 201 Created |
正常に追加された発話の例を示す文字列配列。 |
|
| Other Status Codes |
要求が部分的に成功したことを示します。 応答には、追加された各発話の例の状態を示す文字列配列が含まれています。 |
|
| Other Status Codes |
エラー応答。 |
セキュリティ
Ocp-Apim-Subscription-Key
型:
apiKey
/:
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
}
]
定義
| 名前 | 説明 |
|---|---|
|
Batch |
ラベル付けされた発話の例のバッチを追加するときの応答。 |
|
Entity |
例内で抽出されたエンティティのエンティティの種類と位置を定義します。 |
|
Error |
API で操作を呼び出すときのエラー応答。 |
|
Example |
ラベル付けされた発話の例。 |
|
Label |
ラベル付けされた発話の例を追加するときの応答。 |
|
Operation |
操作の状態の応答。 |
|
Operation |
状態コード。 |
BatchLabelExample
ラベル付けされた発話の例のバッチを追加するときの応答。
| 名前 | 型 | 説明 |
|---|---|---|
| error |
操作の状態の応答。 |
|
| hasError |
boolean |
|
| value |
ラベル付けされた発話の例を追加するときの応答。 |
EntityLabelObject
例内で抽出されたエンティティのエンティティの種類と位置を定義します。
| 名前 | 型 | 説明 |
|---|---|---|
| endCharIndex |
integer |
抽出されたエンティティが終了する発話内のインデックス。 |
| entityName |
string |
エンティティ型。 |
| role |
string |
発話内のエンティティのロール。 |
| startCharIndex |
integer |
抽出されたエンティティが開始される発話内のインデックス。 |
ErrorResponse
API で操作を呼び出すときのエラー応答。
| 名前 | 型 | 説明 |
|---|---|---|
| errorType |
string |
ExampleLabelObject
ラベル付けされた発話の例。
| 名前 | 型 | 説明 |
|---|---|---|
| entityLabels |
発話の例内で識別されたエンティティ。 |
|
| intentName |
string |
発話の例を表す識別された意図。 |
| text |
string |
発話の例。 |
LabelExampleResponse
ラベル付けされた発話の例を追加するときの応答。
| 名前 | 型 | 説明 |
|---|---|---|
| ExampleId |
integer (int64) |
新しく作成されたサンプル ID。 |
| UtteranceText |
string |
発話の例。 |
OperationStatus
操作の状態の応答。
| 名前 | 型 | 説明 |
|---|---|---|
| code |
状態コード。 |
|
| message |
string |
状態の詳細。 |
OperationStatusType
状態コード。
| 値 | 説明 |
|---|---|
| Failed | |
| FAILED | |
| Success |