FAQ-标准问识别(算子)
更新时间:2024-11-04
FAQ-标准问识别(算子)
1、接口地址:GET {IP}:{PORT}/core/v1/faq/recall
2、入参
参数名 | 类型 | 是否可空 | 备注 |
---|---|---|---|
top | int | 是 | 返回结果数,默认返回5条,最大不能超过10条, 超过按照10条返回 |
query | string | 否 | 查询语句 |
3、返回值
参数名 | 类型 | 父节点 | 备注 |
---|---|---|---|
code | int | HTTP状态码 | |
time | long | 时间 | |
msg | string | 状态信息 | |
data | T | 返回数据 | |
total | int | data | 总大小 |
questions | list | data | 查询页数 |
question | string | questions | 问题 |
confidence | double | questions | 相似度 |
answers | map | questions | 回答内容 |
channel | string | questions | 渠道 |
dir | string | questions | 目录标识 |
list | list | answer | 答案 |
text | string | list | 答案内容 |
type | string | list | 答案类型 1文本 3富文本 4图片 |
url | string | list | 图片地址,当answer.list.type=4时,出现此字段 |
detail | list | questions | 扩展问详情 最大值3个 |
question | string | detail | 扩展问 |
confidence | double | detail | 相似度 |
type | int | detail | 问题的类型 0是扩展问 3是模板 |
示例:
Plain Text
1{
2 "time": 1573721580227,
3 "data": {
4 "total": 2,
5 "questions": [
6 {
7 "question": "我爱中国",
8 "confidence": 1,
9 "dir" : "0",
10 "answers": [
11 {
12 "channel": "c1",
13 "list": [
14 {
15 "type": 1,
16 "text": "渠道答案",
17 "url": null
18 }
19 ]
20 },
21 {
22 "channel": "通用渠道",
23 "list": [
24 {
25 "type": 1,
26 "text": "通用答案",
27 "url": null
28 }
29 ]
30 }
31 ],
32 "detail": [
33 {
34 "question": "我爱中国首都",
35 "confidence": 0.06000000238418579,
36 "type": 0
37 },
38 {
39 "question": "我爱北京",
40 "confidence": 0.03333333507180214,
41 "type": 0
42 }
43 ]
44 },
45 {
46 "question": "我爱上海",
47 "confidence": 0.03333333507180214,
48 "dir" : "0",
49 "answers": [
50 {
51 "channel": "通用渠道",
52 "list": [
53 {
54 "type": 1,
55 "text": "通用答案",
56 "url": null
57 }
58 ]
59 }
60 ],
61 "detail": []
62 }
63 ]
64 },
65 "code": 200,
66 "msg": "OK"
67}