列表 run step
开发环境
开发环境
GET
/v1/threads/run_steps/list
您可以在此object下进行对run step的操作,包括检索、列出列表行为,object如下:
参数 | 类型 | 含义 |
---|---|---|
id | string | Run 步骤 id |
object | string | 对象:run step |
created_at | int64 | 创建时间戳 |
run_id | string | Run id |
assistant_id | string | assistantid |
thread_id | string | threadid |
type | string | 类型 |
status | string | 状态 |
cancelled_at | int64 | 取消时间戳 |
completed_at | int64 | 完成时间戳 |
expired_at | int64 | 过期时间戳 |
failed_at | int64 | 失败时间戳 |
last_error | map<string,string> | 错误信息 |
step_details | StepDetails | 步骤详情 |
- StepDetails 结构
参数 | 类型 | 含义 |
---|---|---|
type | string | 取值message_creation或者tool_calls |
message_creation | object | 创建message的详细信息 |
message_creation.message_id | string | 当前Step所创建message的ID |
tool_calls | list | 工具调用的详细信息 |
tool_calls[0].type | string | 包含code_interpreterweb_searchretrievalfunction |
tool_calls[0].code_interpreter | CodeInterpreter | 当工具调用为code_interpreter时显示 |
tool_calls[0].web_search | WebSearch | 当工具调用为web_search时显示 |
tool_calls[0].retrieval | Retrieval | 当工具调用为retrieval时显示 |
tool_calls[0].function | Function | 当工具调用为function时显示 |
Code Interpreter结构
参数 | 类型 | 含义 |
---|---|---|
id | string | tool ID |
type | string | 类型 |
code_interpreter | object | |
code_interpreter.input | string | Code interpreter输入 |
code_interpreter.outputs | object | Code interpreter输出 |
Web Search结构
参数 | 类型 | 含义 |
---|---|---|
id | string | tool ID |
type | string | 类型 |
web_search | object | |
web_search.query | string | 搜索问题 |
web_search.outputs | string | 搜索结果 |
Retrieval结构
参数 | 类型 | 含义 |
---|---|---|
id | string | tool ID |
type | string | 类型 |
retrieval | object | |
retrieval.query | string | 检索问题 |
retrieval.outputs | string | 检索结果 |
Function结构
参数 | 类型 | 含义 |
---|---|---|
id | string | tool ID |
type | string | 类型 |
function | object | |
function.name | string | 函数名称 |
function.arguments | string | 函数参数 |
function.output | string | 函数结果 |
您可以通过此项操作列出已创建的Run的运行步骤的列表。
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request GET 'http://dev-cn.your-api-server.com/v1/threads/run_steps/list?GroupId=${GroupId}' \
--header 'Authorization: Bearer ${API_KEY}' \
--header 'Content-Type: application/json' \
--data-raw '{
"thread_id": "$Thread_Id",
"run_id": "$Run_Id"
}'
响应示例响应示例
{
"object": "list",
"data": [
{
"id": "step_abc123",
"object": "thread.run.step",
"created_at": 1703318061,
"run_id": "run_abc123",
"assistant_id": "asst_abc123",
"thread_id": "thread_abc123",
"type": "tool_calls",
"status": "completed",
"step_details": {
"type": "tool_calls",
"tool_calls": [
{
"id": "call_abc123",
"type": "web_search",
"web_search": {
"name": "get_web_search_result",
"arguments": "{\"search_query\": \"明天 天气\"}",
"output": "[{\"no\":1,\"content\":\"气象公报 更多. 12月22日20时:交通气象预报. 中国气象局与交通运输部2023年12月22日联合发布全国主要公路气象预报. 12月22日18时:天气公报. 我国中东部大部地区气温持续偏低. 12月22日08时:每日天气提示. 山东文登积雪深度达74厘米 未来三天全国雨雪稀少气温 ...\"},{\"no\":2,\"content\":\"明天 12/23 多云 -9~0° 周日 12/24 晴 -9~1° 周一 12/25 晴 -6~2° 周二 12/26 多云 -8~4° 周三 12/27 晴 -8~3° 周四 12/28 晴\"},{\"no\":3,\"content\":\"全国气象干旱综合监测 土壤水分监测 热带气旋监测公报. 官方权威发布天气预报,逐三小时天气预报,提供天气预报查询一周,天气预报15天查询,天气预报40天查询,天气资讯,空气质量,生活指数,旅游出行,交通天气等查询服务.\"},{\"no\":4,\"content\":\"明天. 城市 雷达 云图. 北京 [定制] 01:30更新. -13. 降水量 0mm. 西北风 微风. 相对湿度 62%. 今夜. 12/21.\"},{\"no\":5,\"content\":\"中国气象局-天气预报-城市预报. -8.6. 1034hPa. 23%. 0mm. 西北风 3级.\"},{\"no\":6,\"content\":\"明天预报 明天省份表 明天城市列表 后天预报 后天省份表 后天城市列表 7天预报 7天预报省份表 7天预报城市列表 10天预报 10天预报省份列表 10天预报城市列表 15天预报 15天预报省份列表 15天预报城市列表 空气指数 空气指数省份列表 空气指数城市列表 pm2.5\"},{\"no\":7,\"content\":\"今日天气、明日天气和未来几天的气象报告,并且为用户提供穿衣指数、生活指数、健康指数、交通指数、旅游指数,及各类天气预报资讯。 全国天气网\"},{\"no\":8,\"content\":\"中国气象局-天气预报-城市预报. 国内. 上海. 上海. 2023/12/22 07:05更新. -5℃. 1043hPa. 46%. 0mm.\"},{\"no\":9,\"content\":\"中国气象局-天气预报-城市预报. 2023/12/23 05:20更新. -4℃. 1015hPa. 45%. 0mm. 东南风 微风.\"},{\"no\":10,\"content\":\"中国气象局-天气预报-城市预报. 国内. 上海. 南汇. 2023/12/22 06:45更新. -5.1℃. 1042hPa. 50%. 0mm.\"}]"
}
}
]
},
"base_resp": {}
}
],
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}
请求参数
Query 参数
GroupId
string
必需
示例值:
${GroupId}
Header 参数
Authorization
string
必需
示例值:
Bearer ${API_KEY}
Content-Type
string
必需
示例值:
application/json
Body 参数application/json
返 回响应
修改于 2024-01-03 09:44:38