实时统计当天设备核心数据

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

本文介绍实时统计当天设备核心数据的 API。

接口描述

根据设备 ID,实时统计当天设备核心数据。

接口地址

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

请求参数

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

返回参数

参数名类型说明
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
{
  "device_id": "6c3585ebfe301b40a8u***"
}

返回示例

{
    "result": [
        {
            "date": "20260326",
            "chat_minutes": 77,
            "tool": [
                {
                    "tool_name": "情绪",
                    "tool_count": 69,
                    "tool_code": "emo"
                },
                {
                    "tool_name": "中间态回复技能",
                    "tool_count": 36,
                    "tool_code": "intermediate_reply"
                },
                {
                    "tool_name": "智能家居技能v1.5",
                    "tool_count": 34,
                    "tool_code": "smart_home_v1.5"
                },
                {
                    "tool_name": "角色扮演",
                    "tool_count": 1,
                    "tool_code": "ai_endpoint_control"
                },
                {
                    "tool_name": "日历技能",
                    "tool_count": 1,
                    "tool_code": "calendar"
                }
            ],
            "emotion": [
                {
                    "emotion_count": 36,
                    "emotion_code": "NEUTRAL"
                },
                {
                    "emotion_count": 20,
                    "emotion_code": "HAPPY"
                },
                {
                    "emotion_count": 6,
                    "emotion_code": "THINKING"
                },
                {
                    "emotion_count": 4,
                    "emotion_code": "CONFUSED"
                },
                {
                    "emotion_count": 2,
                    "emotion_code": "RELAXED"
                },
                {
                    "emotion_count": 1,
                    "emotion_code": "ANNOYED"
                }
            ],
            "chat_count": 71
        }
    ],
    "t": 1753707608368,
    "success": true
}

错误码

参考 错误码