查看 assistant 列表
GET
/v1/assistants/list您可以通过此项操作查看已创建的assistant列表。
请求参数
Query 参数
GroupId
string
用户所属的组
示例值:
${GroupId}
Header 参数
Authorization
string
必需
示例值:
Bearer ${API_KEY}
Content-Type
string
必需
示例值:
application/json
Body 参数application/json
limit
integer
必需
order
string
必需
示例
{
"limit": 100,
"order": "desc"
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
object
string
对象
data
array [object {12}]
assistant详情
id
string
必需
object
string
必需
created_at
integer
必需
name
string
必需
description
string
必需
model
string
必需
instructions
string
必需
tools
array [object {2}]
必需
file_ids
array[string]
必需
metadata
object
必需
rolemeta
object
必需
status
string
必需
has_more
boolean
是否有更多未列出
first_id
string
列表首个assistantID
last_id
string
列表最后一个assistantID
base_resp
object
错误状态码和详情
status_code
integer
状态码
1000,未知错误 1001,超时 1002,触发RPM限流 1004,鉴权失败 1008,余额不足 1013,服务内部错误 1027,输出内容错误 1039,触发TPM限流 2013,输入格式信息不正常
status_msg
string
错误详情
示例
{
"object": "list",
"data": [
{
"id": "asst_abc123",
"object": "assistant",
"created_at": 1703239179,
"name": "function",
"description": "代码机器人",
"model": "my_model",
"instructions": "Follow the instructions carefully",
"tools": [
{
"type": "code_interpreter"
}
],
"file_ids": [
"${file id}"
],
"metadata": {
"key1": "value1",
"key2": "value2"
},
"rolemeta": {},
"status": "available"
},
{
"id": "asst_abc123",
"object": "assistant",
"created_at": 1703239487,
"name": "function",
"description": "代码机器人",
"model": "my_model",
"instructions": "Follow the instructions carefully",
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "get weather",
"parameters": {
"type": "object",
"required": [
"city"
],
"properties": {
"city": {
"type": "string"
}
}
}
}
},
{
"type": "code_interpreter"
}
],
"file_ids": [
"${file id}"
],
"metadata": {
"key1": "value1",
"key2": "value2"
},
"rolemeta": {},
"status": "available"
}
],
"has_more": false,
"first_id": "asst_abc456",
"last_id": "asst_abc123",
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}
最后修改时间: 1 年前