标注推荐匹配之问答推荐
更新时间:2024-11-04
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 | 相关度得分 |
示例:
Plain Text
1{
2 "time": 1599051312628,
3 "data": {
4 "total": 3,
5 "list": [
6 {
7 "id": "1d28299e-849f-4369-ac27-4b02ee808f20",
8 "question": "周三游泳",
9 "faqId": "06551076-d2ba-477b-9784-bc1708cc6ad8",
10 "standardQuestion": "周三去游泳",
11 "template": null,
12 "source": "extend",
13 "score": 0.57820547
14 },
15 {
16 "id": "220607b1-1dd7-4cfe-a134-9658a8efd605",
17 "question": "周一去游泳",
18 "faqId": "220607b1-1dd7-4cfe-a134-9658a8efd605",
19 "standardQuestion": "周一去游泳",
20 "template": null,
21 "source": "standard",
22 "score": 0.53020436
23 },
24 {
25 "id": "72ff1dab-353f-4720-8aab-9d53bc433cf3",
26 "question": "周二去游泳",
27 "faqId": "72ff1dab-353f-4720-8aab-9d53bc433cf3",
28 "standardQuestion": "周二去游泳",
29 "template": null,
30 "source": "standard",
31 "score": 0.51336557
32 }
33 ]
34 },
35 "code": 200,
36 "msg": "OK"
37}