将自定义技能添加到技能组
若要将自定义技能集成到索引解决方案,必须使用 Custom.WebApiSkill 技能类型将其技能添加到技能组。
技能定义必须:
- 指定指向 Web API 终结点的 URI,包括参数和标头(如有必要)。
- 设置上下文以指定应在文档层次结构中的哪个点调用技能
- 分配输入值,通常从现有文档字段中分配
- 将输出存储在新字段中,可以选择指定目标字段名称(否则使用输出名称)
{
"skills": [
...,
{
"@odata.type": "#Microsoft.Skills.Custom.WebApiSkill",
"description": "<custom skill description>",
"uri": "https://<web_api_endpoint>?<params>",
"httpHeaders": {
"<header_name>": "<header_value>"
},
"context": "/document/<where_to_apply_skill>",
"inputs": [
{
"name": "<input1_name>",
"source": "/document/<path_to_input_field>"
}
],
"outputs": [
{
"name": "<output1_name>",
"targetName": "<optional_field_name>"
}
]
}
]
}