共用方式為


Examples - Add

在應用程式的版本中新增標示的範例語句。

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}

URI 參數

名稱 位於 必要 類型 Description
appId
path True

string

uuid

應用程式識別碼。

Endpoint
path True

string

支援的認知服務端點 (通訊協定和主機名,例如: https://westus.api.cognitive.microsoft.com) 。

versionId
path True

string

版本識別碼。

enableNestedChildren
query

boolean

切換巢狀/一般格式

要求標頭

名稱 必要 類型 Description
Ocp-Apim-Subscription-Key True

string

要求本文

名稱 類型 Description
entityLabels

EntityLabelObject[]

範例語句內已識別的實體。

intentName

string

表示範例語句的已識別意圖。

text

string

範例語句。

回應

名稱 類型 Description
201 Created

LabelExampleResponse

所建立範例語句的標識碼。

Other Status Codes

ErrorResponse

錯誤回應。

安全性

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

範例

Successful Add Label request

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
}

定義

名稱 Description
EntityLabelObject

定義範例中擷取之實體的實體類型和位置。

ErrorResponse

叫用 API 上的作業時發生錯誤回應。

ExampleLabelObject

標示的範例語句。

LabelExampleResponse

新增標示的範例語句時的回應。

EntityLabelObject

定義範例中擷取之實體的實體類型和位置。

名稱 類型 Description
children

EntityLabelObject[]

範例語句內已識別的實體。

endCharIndex

integer

擷取實體結束之語句內的索引。

entityName

string

實體類型。

role

string

實體在語句中扮演的角色。

startCharIndex

integer

擷取實體啟動之語句內的索引。

ErrorResponse

叫用 API 上的作業時發生錯誤回應。

名稱 類型 Description
errorType

string

ExampleLabelObject

標示的範例語句。

名稱 類型 Description
entityLabels

EntityLabelObject[]

範例語句內已識別的實體。

intentName

string

表示範例語句的已識別意圖。

text

string

範例語句。

LabelExampleResponse

新增標示的範例語句時的回應。

名稱 類型 Description
ExampleId

integer

新建立的範例標識碼。

UtteranceText

string

範例語句。