本文介绍统计历史会话核心数据的 API。
根据设备 ID,统计历史核心数据(T+1),按天数返回列表。
GET: /v1.0/cloud/agent/ai/chat/b/devices/{device_id}/statistical-data-history
| 参数名 | 类型 | 参数位置 | 是否必填 | 说明 |
|---|---|---|---|---|
| device_id | String | path | true | 设备 ID |
body 说明
| 参数名 | 类型 | 参数位置 | 是否必填 | 说明 |
|---|---|---|---|---|
| start_time | String | body | true | 开始日期 |
| end_time | String | body | true | 结束日期 |
| 参数名 | 类型 | 说明 |
|---|---|---|
| chat_count | Integer | 聊天次数 |
| chat_minutes | Integer | 聊天总时长,单位分钟 |
| date | String | 日期 |
| tool | List | 工具调用次数 |
| emotion | List | 情绪统计结果 |
emotion 说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| emotion_name | String | 情绪名称 |
| emotion_code | String | 情绪 Code |
| emotion_count | Integer | 情绪调用次数 |
tool 说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| tool_name | String | 技能名称 |
| tool_code | String | 技能 Code |
| tool_count | Integer | 技能调用次数 |
GET: /v1.0/cloud/agent/ai/chat/b/devices/{device_id}/statistical-data-history
{
"device_id": "6c3585ebfe301b40a8u***",
"start_time": "20260324",
"end_time": "20260325"
}
{
"result": [
{
"date": "20260324",
"chat_minutes": 5,
"tool": [
{
"tool_name": "情绪",
"tool_count": 2,
"tool_code": "emo"
},
{
"tool_name": "智能家居技能v1.5",
"tool_count": 2,
"tool_code": "smart_home_v1.5"
},
{
"tool_name": "中间态回复技能",
"tool_count": 1,
"tool_code": "intermediate_reply"
},
{
"tool_name": "日历技能",
"tool_count": 1,
"tool_code": "calendar"
}
],
"emotion": [
{
"emotion_count": 1,
"emotion_code": "HAPPY"
},
{
"emotion_count": 1,
"emotion_code": "NEUTRAL"
}
],
"chat_count": 12
},
{
"date": "20260325",
"chat_minutes": 127,
"tool": [
{
"tool_name": "情绪",
"tool_count": 43,
"tool_code": "emo"
},
{
"tool_name": "中间态回复技能",
"tool_count": 17,
"tool_code": "intermediate_reply"
},
{
"tool_name": "播控技能",
"tool_count": 2,
"tool_code": "PlayControl"
},
{
"tool_name": "日历技能",
"tool_count": 1,
"tool_code": "calendar"
},
{
"tool_count": 1,
"tool_code": "device_schedule_set"
}
],
"emotion": [
{
"emotion_count": 28,
"emotion_code": "NEUTRAL"
},
{
"emotion_count": 10,
"emotion_code": "HAPPY"
},
{
"emotion_count": 2,
"emotion_code": "CONFUSED"
},
{
"emotion_count": 1,
"emotion_code": "THINKING"
},
{
"emotion_count": 1,
"emotion_code": "RELAXED"
},
{
"emotion_count": 1,
"emotion_code": "SAD"
}
],
"chat_count": 230
}
],
"t": 1753707608368,
"success": true
}
参考 错误码。
该内容对您有帮助吗?
是意见反馈该内容对您有帮助吗?
是意见反馈