该接口用于创建用户专属Agent。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
rdsai:CreateCustomAgent |
create |
*全部资源
|
无 | 无 |
请求语法
POST HTTP/1.1
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| Name |
string |
否 |
专属 Agent 名称。 |
查询实例列表Agent |
| SystemPrompt |
string |
是 |
系统提示。 |
我是您用来查询实例列表的专属Agent |
| EnableTools |
boolean |
否 |
是否启用工具。 |
true |
| Tools |
array |
否 |
工具信息。 |
|
|
string |
否 |
工具详情 |
describe_db_instances |
|
| SkillIds |
array |
否 |
关联的技能 ID 列表 |
|
|
string |
否 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
对象。 |
||
| CreatedAt |
string |
创建时间。 |
2020-11-27 16:01:28 |
| EnableTools |
boolean |
是否启用工具。 |
true |
| Id |
string |
AgentId |
d1b7d639-f34e-44c7-8231-987da14d**** |
| Name |
string |
专属 Agent 名称。 |
查询实例列表Agent |
| RequestId |
string |
请求 Id。 |
FE9C65D7-930F-57A5-A207-8C396329**** |
| Skills |
array<object> |
||
|
object |
|||
| Description |
string |
||
| Id |
string |
||
| Name |
string |
||
| SkillType |
string |
||
| SystemPrompt |
string |
系统提示。 |
我是您用来查询实例列表的专属Agent |
| Tools |
array |
工具信息。 |
|
|
string |
工具详情 |
describe_db_instances |
示例
正常返回示例
JSON格式
{
"CreatedAt": "2020-11-27 16:01:28",
"EnableTools": true,
"Id": "d1b7d639-f34e-44c7-8231-987da14d****",
"Name": "查询实例列表Agent",
"RequestId": "FE9C65D7-930F-57A5-A207-8C396329****",
"Skills": [
{
"Description": "",
"Id": "",
"Name": "",
"SkillType": ""
}
],
"SystemPrompt": "我是您用来查询实例列表的专属Agent",
"Tools": [
"describe_db_instances"
]
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidParameter | The provided parameter is invalid. | 无效的参数。 |
| 400 | InvalidParam | The provided parameter is invalid. | 参数无效 |
| 400 | CustomAgentQuotaExceeded | The maximum number of custom agents has been reached. | 自定义 Agent 数量已达到上限。 |
| 403 | SkillNotBelongToUser | One or more skills are not accessible to the current user. | 当前用户无权访问一个或多个技能。 |
| 409 | CustomAgentNameDuplicated | A custom agent with the same name already exists. | 已存在同名的自定义 Agent。 |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。