次の方法で共有


Examples - Batch

アプリケーションのバージョンにラベル付けされた発話の例のバッチを追加します。

POST {Endpoint}/luis/api/v2.0/apps/{appId}/versions/{versionId}/examples

URI パラメーター

名前 / 必須 説明
appId
path True

string (uuid)

アプリケーション ID。

Endpoint
path True

string

サポートされている Cognitive Services エンドポイント (プロトコルとホスト名、例: https://westus.api.cognitive.microsoft.com)。

versionId
path True

string

バージョン ID。

要求ヘッダー

名前 必須 説明
Ocp-Apim-Subscription-Key True

string

要求本文

名前 説明
exampleLabelObjectArray

ExampleLabelObject[]

発話の例の配列。

応答

名前 説明
201 Created

BatchLabelExample[]

正常に追加された発話の例を示す文字列配列。

Other Status Codes

BatchLabelExample[]

要求が部分的に成功したことを示します。 応答には、追加された各発話の例の状態を示す文字列配列が含まれています。

Other Status Codes

ErrorResponse

エラー応答。

セキュリティ

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
  }
]

定義

名前 説明
BatchLabelExample

ラベル付けされた発話の例のバッチを追加するときの応答。

EntityLabelObject

例内で抽出されたエンティティのエンティティの種類と位置を定義します。

ErrorResponse

API で操作を呼び出すときのエラー応答。

ExampleLabelObject

ラベル付けされた発話の例。

LabelExampleResponse

ラベル付けされた発話の例を追加するときの応答。

OperationStatus

操作の状態の応答。

OperationStatusType

状態コード。

BatchLabelExample

ラベル付けされた発話の例のバッチを追加するときの応答。

名前 説明
error

OperationStatus

操作の状態の応答。

hasError

boolean

value

LabelExampleResponse

ラベル付けされた発話の例を追加するときの応答。

EntityLabelObject

例内で抽出されたエンティティのエンティティの種類と位置を定義します。

名前 説明
endCharIndex

integer

抽出されたエンティティが終了する発話内のインデックス。

entityName

string

エンティティ型。

role

string

発話内のエンティティのロール。

startCharIndex

integer

抽出されたエンティティが開始される発話内のインデックス。

ErrorResponse

API で操作を呼び出すときのエラー応答。

名前 説明
errorType

string

ExampleLabelObject

ラベル付けされた発話の例。

名前 説明
entityLabels

EntityLabelObject[]

発話の例内で識別されたエンティティ。

intentName

string

発話の例を表す識別された意図。

text

string

発話の例。

LabelExampleResponse

ラベル付けされた発話の例を追加するときの応答。

名前 説明
ExampleId

integer (int64)

新しく作成されたサンプル ID。

UtteranceText

string

発話の例。

OperationStatus

操作の状態の応答。

名前 説明
code

OperationStatusType

状態コード。

message

string

状態の詳細。

OperationStatusType

状態コード。

説明
FAILED
Failed
Success