标注推荐匹配之问答推荐
更新时间:2023-03-13
1、接口地址:GET {IP}:{PORT}/open/v1/label/recommend/faq
2、说明:根据用户问法获取推荐意图
3、入参(query param中)
参数名 | 类型 | 是否可空 | 备注 |
---|---|---|---|
query | string | 用户问法 |
4、返回值
参数名 | 类型 | 父节点 | 备注 |
---|---|---|---|
code | int | HTTP状态码 | |
time | long | 时间 | |
msg | string | 状态信息 | |
data | T | 返回数据 | |
list | list | data | 数据列表 |
total | int | data | 总数 |
faqId | string | list | faqId |
standardQuestion | string | list | faq标准问 |
source | string | list | 匹配种类,例如standard代表标准问,extend代表扩展问 |
score | float | list | 相关度得分 |
示例:
{
"time": 1599051312628,
"data": {
"total": 3,
"list": [
{
"id": "1d28299e-849f-4369-ac27-4b02ee808f20",
"question": "周三游泳",
"faqId": "06551076-d2ba-477b-9784-bc1708cc6ad8",
"standardQuestion": "周三去游泳",
"template": null,
"source": "extend",
"score": 0.57820547
},
{
"id": "220607b1-1dd7-4cfe-a134-9658a8efd605",
"question": "周一去游泳",
"faqId": "220607b1-1dd7-4cfe-a134-9658a8efd605",
"standardQuestion": "周一去游泳",
"template": null,
"source": "standard",
"score": 0.53020436
},
{
"id": "72ff1dab-353f-4720-8aab-9d53bc433cf3",
"question": "周二去游泳",
"faqId": "72ff1dab-353f-4720-8aab-9d53bc433cf3",
"standardQuestion": "周二去游泳",
"template": null,
"source": "standard",
"score": 0.51336557
}
]
},
"code": 200,
"msg": "OK"
}