查询记忆列表

更新时间:2026-02-26 09:17:10LLM 副本以 Markdown 格式查看下载 PDF

本文介绍查询记忆列表的 API。

接口描述

根据设备 ID,查询 AI 智能体角色的记忆列表。

接口地址

GET: /v1.0/cloud/agent/ai/chat/b/devices/{device_id}/memories

请求参数

参数名类型参数位置是否必填说明
device_idStringpathtrue设备 ID
bind_role_typeIntegerquerytrue绑定角色类型
  • 0:自定义角色
  • 1:模板角色
  • 2:单角色(即无角色,数据在智能体维度上)
role_id 传递时,此值必须传递
role_idStringquerytrue角色 ID

返回参数

参数名类型说明
effective_scope_nameString记忆作用域名称
effective_scopeInteger记忆作用域编号
memory_listList记忆信息列表

memory_list 说明

参数名类型说明
memory_valueString记忆内容
memory_keyString记忆键
memory_nameString记忆名称
effective_scope_nameString记忆作用域名称
effective_scopeInteger记忆作用域编号

请求示例

GET: /v1.0/cloud/agent/ai/chat/b/devices/{device_id}/memories
{
  "device_id": "6c3585ebfe301b40a8u***",
  "bind_role_type": 1,
  "role_id": "94300***"
}

返回示例

[
    {
        "effective_scope_name": "角色的记忆",
        "memory_list": [
            {
                "memory_value": "踢足球,打篮球,写代码,读书",
                "memory_name": "兴趣爱好",
                "effective_scope_name": "角色的记忆",
                "memory_key": "sys.memoryInterests",
                "effective_scope": 3
            },
            {
                "memory_value": "一百岁",
                "memory_name": "年龄",
                "effective_scope_name": "角色的记忆",
                "memory_key": "sys.memoryAge",
                "effective_scope": 3
            },
            {
                "memory_value": "七月七号",
                "memory_name": "生日",
                "effective_scope_name": "角色的记忆",
                "memory_key": "sys.memoryBirthday",
                "effective_scope": 3
            },
            {
                "memory_value": "涂小鸭",
                "memory_name": "姓名",
                "effective_scope_name": "角色的记忆",
                "memory_key": "sys.memoryUserFullName",
                "effective_scope": 3
            }
        ],
        "effective_scope": 3
    }
]

错误码

参考 错误码