统计历史会话核心数据

更新时间:2026-03-30 06:51:53LLM 副本以 Markdown 格式查看下载 PDF

本文介绍统计历史会话核心数据的 API。

接口描述

根据设备 ID,统计历史核心数据(T+1),按天数返回列表。

接口地址

GET: /v1.0/cloud/agent/ai/chat/b/devices/{device_id}/statistical-data-history

请求参数

参数名类型参数位置是否必填说明
device_idStringpathtrue设备 ID

body 说明

参数名类型参数位置是否必填说明
start_timeStringbodytrue开始日期
end_timeStringbodytrue结束日期

返回参数

参数名类型说明
chat_countInteger聊天次数
chat_minutesInteger聊天总时长,单位分钟
dateString日期
toolList工具调用次数
emotionList情绪统计结果

emotion 说明

参数名类型说明
emotion_nameString情绪名称
emotion_codeString情绪 Code
emotion_countInteger情绪调用次数

tool 说明

参数名类型说明
tool_nameString技能名称
tool_codeString技能 Code
tool_countInteger技能调用次数

请求示例

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
}

错误码

参考 错误码