本文介绍更新智能体变量的 API。
根据设备 ID,更新智能体变量。
PUT: /v1.0/cloud/agent/ai/b/devices/{device_id}/agent-variables
| 参数名 | 类型 | 参数位置 | 是否必填 | 说明 |
|---|---|---|---|---|
| device_id | String | path | true | 设备 ID |
body 说明
| 参数名 | 类型 | 参数位置 | 是否必填 | 说明 |
|---|---|---|---|---|
| bind_role_type | Integer | body | false | 绑定角色类型
role_id 传递时,此值必须传递 |
| role_id | String | body | false | 角色 ID |
| variable_map | Map | body | true | 变量映射关系 |
| 参数名 | 类型 | 说明 |
|---|---|---|
| variable_key | String | 变量键 |
| variable_value | String | 变量值 |
PUT: /v1.0/cloud/agent/ai/b/devices/{device_id}/agent-variables
{
"device_id": "6c3585ebfe301b40a8u***",
"variable_map": {
"custom.familyName": "testFamilyName"
}
}
[
{
"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
}
]
参考 错误码。
该内容对您有帮助吗?
是意见反馈该内容对您有帮助吗?
是意见反馈