Examples - Add
在應用程式的版本中新增標示的範例語句。
POST {Endpoint}/luis/api/v2.0/apps/{appId}/versions/{versionId}/example
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
app
|
path | True |
string uuid |
應用程式識別碼。 |
Endpoint
|
path | True |
string |
支援的認知服務端點 (通訊協定和主機名,例如: https://westus.api.cognitive.microsoft.com) 。 |
version
|
path | True |
string |
版本識別碼。 |
要求標頭
名稱 | 必要 | 類型 | Description |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
要求本文
名稱 | 類型 | Description |
---|---|---|
entityLabels |
範例語句內已識別的實體。 |
|
intentName |
string |
表示範例語句的已識別意圖。 |
text |
string |
範例語句。 |
回應
名稱 | 類型 | Description |
---|---|---|
201 Created |
所建立範例語句的標識碼。 |
|
Other Status Codes |
錯誤回應。 |
安全性
Ocp-Apim-Subscription-Key
Type:
apiKey
In:
header
範例
Successful Add Label request
Sample Request
POST {Endpoint}/luis/api/v2.0/apps/86226c53-b7a6-416f-876b-226b2b5ab07b/versions/0.1/example
{
"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 |
---|---|
Entity |
定義範例中擷取之實體的實體類型和位置。 |
Error |
叫用 API 上的作業時發生錯誤回應。 |
Example |
標示的範例語句。 |
Label |
新增標示的範例語句時的回應。 |
EntityLabelObject
定義範例中擷取之實體的實體類型和位置。
名稱 | 類型 | Description |
---|---|---|
endCharIndex |
integer |
擷取實體結束之語句內的索引。 |
entityName |
string |
實體類型。 |
role |
string |
語句中實體的角色。 |
startCharIndex |
integer |
擷取實體啟動之語句內的索引。 |
ErrorResponse
叫用 API 上的作業時發生錯誤回應。
名稱 | 類型 | Description |
---|---|---|
errorType |
string |
ExampleLabelObject
標示的範例語句。
名稱 | 類型 | Description |
---|---|---|
entityLabels |
範例語句內已識別的實體。 |
|
intentName |
string |
表示範例語句的已識別意圖。 |
text |
string |
範例語句。 |
LabelExampleResponse
新增標示的範例語句時的回應。
名稱 | 類型 | Description |
---|---|---|
ExampleId |
integer |
新建立的範例標識碼。 |
UtteranceText |
string |
範例語句。 |