你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Examples - Add
在应用程序的版本中添加标记的示例话语。
POST {Endpoint}/luis/api/v2.0/apps/{appId}/versions/{versionId}/example
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
app
|
path | True |
string (uuid) |
应用程序 ID。 |
Endpoint
|
path | True |
string |
支持的认知服务终结点(协议和主机名,例如:https://westus.api.cognitive.microsoft.com)。 |
version
|
path | True |
string |
版本 ID。 |
请求头
名称 | 必需 | 类型 | 说明 |
---|---|---|---|
Ocp-Apim-Subscription-Key | True |
string |
请求正文
名称 | 类型 | 说明 |
---|---|---|
entityLabels |
示例话语中的标识实体。 |
|
intentName |
string |
表示示例话语的已标识意向。 |
text |
string |
示例话语。 |
响应
名称 | 类型 | 说明 |
---|---|---|
201 Created |
创建的示例话语的 ID。 |
|
Other Status Codes |
错误响应。 |
安全性
Ocp-Apim-Subscription-Key
类型:
apiKey
在:
header
示例
Successful Add Label 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
}
]
}
示例响应
{
"UtteranceText": "whats the weather in buenos aires?",
"ExampleId": -11
}
定义
名称 | 说明 |
---|---|
Entity |
定义提取实体在示例中的实体类型和位置。 |
Error |
调用 API 上的作时出现错误响应。 |
Example |
标记的示例话语。 |
Label |
添加标记的示例话语时的响应。 |
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 |
示例话语。 |