DialogAnalyse - 对话分析
更新时间:2025-02-24
API访问域名
请求方式 | GET | 说明 |
---|---|---|
online base url | https://keyue.cloud.baidu.com/online | AI客服发布后的请求地址 |
offline base url | https://keyue.cloud.baidu.com | AI客服测试调试地址 |
后缀接口 | /open/v1/api/v2/dialog/analyse/detail | |
Authentication | token为API Key |
说明
无
请求参数
Header参数
名称 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|
Content-Type | string | 是 | 内容类型 | 固定值:application/json |
token | string | 是 | API KEY | 集成-API-API Key处获取。 详细获取方式参考:准备工作 |
uid | string | 是 | 用户ID | 鼠标移动至页面右上角账户头像即可获取。 详细获取方式参考:准备工作 |
username | string | 是 | 用户名 | 鼠标移动至页面右上角账户头像即可获取。 详细获取方式参考:准备工作 |
Parameter参数
名称 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|
queryId | string | 是 | 对话ID | 用于标识本次对话的唯一ID |
chunkId | integer | 流式chunkid | 0 |
响应参数
名称 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|
time | integer | 是 | 时间 | 1731652004333 |
data | object | 是 | 数据 | 数据对象,详见data子数据 |
code | integer | 是 | 状态码 | 200 |
msg | string | 是 | 消息 | OK |
data子数据
名称 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|
agentId | string | 是 | agent ID | cf9dfd3f - 3913 - 4a15 - 8bfe - fb295ffcbbe0 |
queryId | string | 是 | query ID | 26492709 - 7538 - 44aa - a9c4 - c119a7ab42d5 |
chunkId | integer | 是 | 流式chunkId | 流式会话将AI的回答分块(chunk)返回,一次返回一个chunk,该参数标识一次对话中的唯一chunk |
noEsData | boolean | 是 | 是否无 ES 数据 | false |
queryText | string | 是 | 用户问题 | 请求的问题,比如示例中的:查询表格 |
queryStatus | integer | 是 | Query状态 | 0 |
rewriteQuery | string | 是 | 改写的query | |
rewriteStatus | integer | 是 | 改写状态 | 0 |
truthQuery | null | 是 | ||
tops | array | 是 | 知识图谱数据 | 包含多个知识图谱相关信息,详见tops子数据 |
intents | array | 是 | 意图信息 | 包含多个意图相关信息,详见intents子数据 |
correctIntents | null | 是 | 正确意图 | |
intentsStatus | null | 是 | 意图状态 | |
ebReplyText | string | 是 | EB 回复文本 | 抱歉,您的问题可能需要更具体的描述,才能帮助您进行查询。请问您是想查询订单表、客户表还是产品表的信息呢?或者您是想查询某个特定订单、客户或产品的信息呢?请提供更多的信息以便我们能够为您提供帮助。 |
ebReplyType | integer | 是 | EB 回复类型 | |
ebReplyStatus | integer | 是 | EB 回复状态 | |
expectReply | null | 是 | 期望回复 | |
slotCollectInfo | null | 是 | 槽位收集信息 | |
sourceCode | string | 是 | 表格问答查询源代码 | # 查询所有表格的基本信息,包括前 5 行数据和列名print("订单表信息:")print(df1.info())print(df1.head())print("\n客户表信息:")print(df2.info())print(df2.head())print("\n产品表信息:")print(df3.info())print(df3.head()) |
tableSelectResult | array | 是 | 选表结果 | 和query有关的表格,详见tableSelectResult子数据 |
tops子数据
名称 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|
id | string | 是 | 知识图谱 ID | 每个知识图谱数据中的 ID,在 tops 数组中的元素都有此属性,如 4169e31a - 3847 - 42cc - aabc - 93a1e05e4929 |
kgType | integer | 是 | 知识图谱类型 | 每个知识图谱数据中的类型,在 tops 数组中的元素都有此属性,如 4 |
content | null | 是 | 内容 | 每个知识图谱数据中的内容,在 tops 数组中的元素都有此属性,此处无值 |
type | integer | 是 | 类型 | 每个知识图谱数据中的类型,在 tops 数组中的元素都有此属性,如 1 |
confidence | null | 是 | 置信度 | 每个知识图谱数据中的置信度,在 tops 数组中的元素都有此属性,此处无值 |
isIntervent | null | 是 | 是否干预 | 每个知识图谱数据中的是否干预属性,在 tops 数组中的元素都有此属性,此处无值 |
interventKgId | null | 是 | 干预知识图谱 ID | 每个知识图谱数据中的干预知识图谱 ID,在 tops 数组中的元素都有此属性,此处无值 |
sourceKgName | string | 是 | 源知识图谱名称 | 每个知识图谱数据中的源知识图谱名称,在 tops 数组中的元素都有此属性,如 wwide.xlsx |
sourceKgId | string | 是 | 源知识图谱 ID | 每个知识图谱数据中的源知识图谱 ID,在 tops 数组中的元素都有此属性,如 4169e31a - 3847 - 42cc - aabc - 93a1e05e4929 |
webUrl | null | 是 | 网页 URL | 每个知识图谱数据中的网页 URL,在 tops 数组中的元素都有此属性,此处无值 |
videoUrl | null | 是 | 视频 URL | 每个知识图谱数据中的视频 URL,在 tops 数组中的元素都有此属性,此处无值 |
startTimestampSecond | null | 是 | 开始时间戳(秒) | 每个知识图谱数据中的开始时间戳(秒),在 tops 数组中的元素都有此属性,此处无值 |
endTimestampSecond | null | 是 | 结束时间戳(秒) | 每个知识图谱数据中的结束时间戳(秒),在 tops 数组中的元素都有此属性,此处无值 |
knowledgeType | string | 是 | 知识类型 | 每个知识图谱数据中的知识类型,在 tops 数组中的元素都有此属性,如 tableQa |
matchInfoList | null | 是 | 匹配信息列表 | 每个知识图谱数据中的匹配信息列表,在 tops 数组中的元素都有此属性,此处无值 |
thumbStatus | null | 是 | 缩略图状态 | 每个知识图谱数据中的缩略图状态,在 tops 数组中的元素都有此属性,此处无值 |
isCustom | null | 是 | 是否自定义 | 每个知识图谱数据中的是否自定义属性,在 tops 数组中的元素都有此属性,此处无值 |
intents子数据
名称 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|
id | string | 是 | 意图 ID | 每个意图信息中的 ID,在 intents 数组中的元素都有此属性,如 sys_intent_18 |
name | string | 是 | 意图名称 | 每个意图信息中的名称,在 intents 数组中的元素都有此属性,如 sys_table_qa |
agentId | null | 是 | 代理 ID | 每个意图信息中的代理 ID,在 intents 数组中的元素都有此属性,此处无值 |
nameZh | string | 是 | 意图中文名 | 每个意图信息中的中文名,在 intents 数组中的元素都有此属性,如表格问数意图 |
confidence | string | 是 | 意图置信度 | 每个意图信息中的置信度,在 intents 数组中的元素都有此属性,如 1.0 |
isCustom | null | 是 | 是否自定义 | 每个意图信息中的是否自定义属性,在 intents 数组中的元素都有此属性,此处无值 |
source | null | 是 | 意图来源 | 每个意图信息中的来源,在 intents 数组中的元素都有此属性,此处无值 |
recSource | string | 是 | 推荐来源 | 每个意图信息中的推荐来源,在 intents 数组中的元素都有此属性,如 largeModel |
tableSelectResult子数据
名称 | 类型 | 必选 | 中文名 | 说明 |
---|---|---|---|---|
file_name | string | 是 | 文件名 | 每个表格选择结果中的文件名,在 tableSelectResult 数组中的元素都有此属性,如 wwide.xlsx |
table_name | string | 是 | 表名 | 每个表格选择结果中的表名,在 tableSelectResult 数组中的元素都有此属性,如订单 |
datasource_id | string | 是 | 数据源 ID | 每个表格选择结果中的数据源 ID,在 tableSelectResult 数组中的元素都有此属性,如空字符串 |
bos_url | string | 是 | BOS URL | 每个表格选择结果中的 BOS URL,在 tableSelectResult 数组中的元素都有此属性,如 https://keyue - test.cloud.baidu.com/api/v2/file/download?key=Ym9zXzFlYzZiOGU4LTBmYzgtNDQ3MC05MTg5LTJmYTRjNzg3N2U1Nw== |
file_id | string | 是 | 文件 ID | 每个表格选择结果中的文件 ID,在 tableSelectResult 数组中的元素都有此属性,如 4169e31a - 3847 - 42cc - aabc - 93a1e05e4929 |
请求示例
Bash
1curl --location --request GET 'https://keyue.cloud.baidu.com/open/v1/api/v2/dialog/analyse/detail?queryId=26492709-7538-44aa-a9c4-c119a7ab42d5&chunkId=0' \
2--header 'token: e9ed5f3c-b144-4186-ad70-5fcff1f4d94a' \
3--header 'Content-Type: application/json' \
4--header 'uid: cf7d9692703d45d1b5517a30ab3efa53' \
5--header 'username: pnstest5'
响应示例
表格问答分析
1{
2 "time": 1731652004333,
3 "data": {
4 "agentId": "cf9dfd3f-3913-4a15-8bfe-fb295ffcbbe0",
5 "queryId": "26492709-7538-44aa-a9c4-c119a7ab42d5",
6 "chunkId": 0,
7 "noEsData": false,
8 "queryText": "查询表格",
9 "queryStatus": 0,
10 "rewriteQuery": "查询表格",
11 "rewriteStatus": 0,
12 "truthQuery": null,
13 "tops": [
14 {
15 "id": "4169e31a-3847-42cc-aabc-93a1e05e4929",
16 "kgType": 4,
17 "content": null,
18 "type": 1,
19 "confidence": null,
20 "isIntervent": null,
21 "interventKgId": null,
22 "sourceKgName": "wwide.xlsx",
23 "sourceKgId": "4169e31a-3847-42cc-aabc-93a1e05e4929",
24 "webUrl": null,
25 "videoUrl": null,
26 "startTimestampSecond": null,
27 "endTimestampSecond": null,
28 "knowledgeType": "tableQa",
29 "matchInfoList": null,
30 "thumbStatus": null,
31 "isCustom": null
32 },
33 {
34 "id": "4169e31a-3847-42cc-aabc-93a1e05e4929",
35 "kgType": 4,
36 "content": null,
37 "type": 1,
38 "confidence": null,
39 "isIntervent": null,
40 "interventKgId": null,
41 "sourceKgName": "wwide.xlsx",
42 "sourceKgId": "4169e31a-3847-42cc-aabc-93a1e05e4929",
43 "webUrl": null,
44 "videoUrl": null,
45 "startTimestampSecond": null,
46 "endTimestampSecond": null,
47 "knowledgeType": "tableQa",
48 "matchInfoList": null,
49 "thumbStatus": null,
50 "isCustom": null
51 },
52 {
53 "id": "4169e31a-3847-42cc-aabc-93a1e05e4929",
54 "kgType": 4,
55 "content": null,
56 "type": 1,
57 "confidence": null,
58 "isIntervent": null,
59 "interventKgId": null,
60 "sourceKgName": "wwide.xlsx",
61 "sourceKgId": "4169e31a-3847-42cc-aabc-93a1e05e4929",
62 "webUrl": null,
63 "videoUrl": null,
64 "startTimestampSecond": null,
65 "endTimestampSecond": null,
66 "knowledgeType": "tableQa",
67 "matchInfoList": null,
68 "thumbStatus": null,
69 "isCustom": null
70 }
71 ],
72 "intents": [
73 {
74 "id": "sys_intent_18",
75 "name": "sys_table_qa",
76 "agentId": null,
77 "nameZh": "表格问数意图",
78 "confidence": "1.0",
79 "isCustom": null,
80 "source": null,
81 "recSource": "largeModel"
82 }
83 ],
84 "correctIntents": null,
85 "intentsStatus": null,
86 "ebReplyText": "抱歉,您的问题可能需要更具体的描述,才能帮助您进行查询。请问您是想查询订单表、客户表还是产品表的信息呢?或者您是想查询某个特定订单、客户或产品的信息呢?请提供更多的信息以便我们能够为您提供帮助。",
87 "ebReplyType": 1,
88 "ebReplyStatus": 0,
89 "expectReply": null,
90 "slotCollectInfo": null,
91 "sourceCode": "# 查询所有表格的基本信息,包括前5行数据和列名\nprint(\"订单表信息:\")\nprint(df1.info())\nprint(df1.head())\n\nprint(\"\\n客户表信息:\")\nprint(df2.info())\nprint(df2.head())\n\nprint(\"\\n产品表信息:\")\nprint(df3.info())\nprint(df3.head())",
92 "tableSelectResult": [
93 {
94 "file_name": "wwide.xlsx",
95 "table_name": "订单",
96 "datasource_id": "",
97 "bos_url": "https://keyue-test.cloud.baidu.com/api/v2/file/download?key=Ym9zXzFlYzZiOGU4LTBmYzgtNDQ3MC05MTg5LTJmYTRjNzg3N2U1Nw==",
98 "file_id": "4169e31a-3847-42cc-aabc-93a1e05e4929"
99 },
100 {
101 "file_name": "wwide.xlsx",
102 "table_name": "客户表",
103 "datasource_id": "",
104 "bos_url": "https://keyue-test.cloud.baidu.com/api/v2/file/download?key=Ym9zXzFlYzZiOGU4LTBmYzgtNDQ3MC05MTg5LTJmYTRjNzg3N2U1Nw==",
105 "file_id": "4169e31a-3847-42cc-aabc-93a1e05e4929"
106 },
107 {
108 "file_name": "wwide.xlsx",
109 "table_name": "产品表",
110 "datasource_id": "",
111 "bos_url": "https://keyue-test.cloud.baidu.com/api/v2/file/download?key=Ym9zXzFlYzZiOGU4LTBmYzgtNDQ3MC05MTg5LTJmYTRjNzg3N2U1Nw==",
112 "file_id": "4169e31a-3847-42cc-aabc-93a1e05e4929"
113 }
114 ]
115 },
116 "code": 200,
117 "msg": "OK"
118}