更新智能体
AgentUpdate 更新Agent
请求URL
POST /api/v1/agent/update
请求参数
| 参数 |
取值 |
说明 |
| Content-Type |
application/json |
指定请求正文的数据格式。当值为 application/json 时,表明请求体(Body)内容以 JSON 格式组织,服务端将按 JSON 规范解析请求参数。 |
| X-TraceId |
string |
traceId |
| Authorization |
Bearer $AccessToken |
用于验证客户端身份的访问令牌 |
Body
| 参数 |
类型 |
是否必填 |
描述 |
备注 |
| id |
string |
是 |
agent ID |
"agent_1234567890" |
| name |
string |
是 |
agent名称 |
"TestAgent" |
| intro |
string |
是 |
agent说明 |
"Test agent" |
| memory |
map[string]json struct |
是 |
记忆列表 |
{"mem1": {"name": "Memory1", "description": "Description for Memory1", "default": "Default Value1"}} |
| learn |
map[string]json struct |
是 |
知识库列表 |
{"learn1": {}} |
| config.prologue |
string |
否 |
开场白 |
"Hello, I am your agent." |
| config.recommendation_question |
[]string |
否 |
推荐问题列表 |
["What is your name?", "How can I assist you?"] |
| config.voice |
string |
否 |
声音ID |
"voice_id_001" |
| config.figure |
string |
否 |
形象ID |
"figure_id_001" |
| config.tools |
map[string]json struct |
否 |
工具列表 |
{"tool1": {"version": "1.1", "running_config": {"k1": "v1"}}} |
| config.workflow_id |
string |
否 |
绑定的工作流ID |
"workflow_001" |
| config.character_profile |
string |
否 |
人设 |
"friendly" |
| config.model |
string |
否 |
模型名称 |
"example_model" |
请求示例
{
"id": "agent_1234567890",
"name": "TestAgent",
"intro": "Test agent",
"memory": {
"mem1": {
"name": "Memory1",
"description": "Description for Memory1",
"default": "Default Value1"
}
},
"learn": {
"learn1": {}
},
"config": {
"prologue": "Hello, I am your agent.",
"recommendation_question": [
"What is your name?",
"How can I assist you?"
],
"voice": "voice_id_001",
"figure": "figure_id_001",
"workflow_id": "workflow_001",
"character_profile": "friendly",
"model": "example_model"
}
}
响应参数
| 参数 |
类型 |
描述 |
备注 |
| code |
int |
状态码 |
|
| message |
string |
OK或者错误信息 |
|
响应示例
{
"code": 0,
"message": "OK"
}