OpenAI(ChatGPT)
  1. 运行(Runs)
OpenAI(ChatGPT)
  • 介绍
  • 项目说明
  • 导言
  • 身份验证
  • 发出请求
  • 参数详情
  • 音频(Audio)
    • 创建语音
      POST
    • 创建转录
      POST
    • 创建翻译
      POST
  • 聊天(Chat)
    • Chat Completions 对象
    • Chat Completions 对象块
    • 创建 Chat Completions
      POST
  • 自动补全(Completions)
    • Completions 对象
    • 创建 Completions
      POST
  • 嵌入(Embeddings)
    • 嵌入对象
    • 创建嵌入
      POST
  • 微调(Fine-tuning)
    • 微调作业对象
    • 微调作业事件对象
    • 创建微调作业
    • 列出微调作业
    • 检索微调作业
    • 取消微调
    • 列出微调事件
  • 文件(Files)
    • README
    • 文件对象
    • 列出文件
    • 上传文件
    • 删除文件
    • 检索文件
    • 检索文件内容
  • 图像(Images)
    • README
    • 图像对象
    • 创建图像
    • 创建图片编辑
    • 创建图像变体
  • 模型(Models)
    • 模型对象
    • 列出模型
    • 检索模型
    • 删除微调模型
  • 审查(Moderations)
    • 调节对象
    • 创建内容审核
  • 助手测试版(AssistantsBeta)
    • 辅助对象
    • 辅助文件对象
    • 创建助手
    • 检索助手
    • 修改助手
    • 删除助手
    • 列出助手
    • 创建辅助文件
    • 检索助手文件
    • 删除辅助文件
    • 列出助手文件
  • 线程数(Threads)
    • 线程对象
    • 创建线程
    • 检索线程
    • 修改线程
    • 删除话题
  • 留言(Messages)
    • 消息对象
    • 消息文件对象
    • 创建消息
    • 检索消息
    • 修改留言
    • 列出消息
    • 检索消息文件
    • 列出消息文件
  • 运行(Runs)
    • 运行对象
    • 运行步骤对象
    • 创建运行
      POST
    • 检索运行
      GET
    • 修改运行
      GET
    • 列表运行
      GET
    • 提交工具输出以运行
      POST
    • 取消运行
      POST
    • 创建线程并运行
      POST
    • 检索运行步骤
      GET
    • 列出运行步骤
      GET
  • 已弃用-音频(Audio)
    • 创建转录
    • 创建翻译
  1. 运行(Runs)

取消运行

POST
https://api.openai.com/v1/threads/{thread_id}/runs/{run_id}/cancel
取消运行in_progress。
与指定 ID 匹配的修改后的运行对象。
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.openai.com/v1/threads//runs//cancel'
响应示例响应示例
{
  "id": "string",
  "object": "string",
  "created_at": 0,
  "assistant_id": "string",
  "thread_id": "string",
  "status": "string",
  "started_at": 0,
  "expires_at": 0,
  "cancelled_at": null,
  "failed_at": null,
  "completed_at": null,
  "last_error": null,
  "model": "string",
  "instructions": "string",
  "tools": [
    {
      "type": "string"
    }
  ],
  "file_ids": [
    "string"
  ],
  "metadata": {}
}

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Path 参数
thread_id
string 
必需
此运行所属线程的 ID。
run_id
string 
必需
要取消的运行的 ID。

返回响应

🟢200成功
application/json
Body
id
string 
必需
object
string 
必需
created_at
integer 
必需
assistant_id
string 
必需
thread_id
string 
必需
status
string 
必需
started_at
integer 
必需
expires_at
integer 
必需
cancelled_at
null 
必需
failed_at
null 
必需
completed_at
null 
必需
last_error
null 
必需
model
string 
必需
instructions
string 
必需
tools
array [object {1}] 
必需
type
string 
可选
file_ids
array[string]
必需
metadata
object 
必需

扫码加入 Open AI(ChatGPT)微信交流群

欢迎加入 Open AI(ChatGPT) 交流群!让大家可以分享和讨论有关 Open AI(ChatGPT)API 的开发和使用等相关话题。

扫码加入交流群
修改于 2023-11-09 10:23:35
上一页
提交工具输出以运行
下一页
创建线程并运行
Built with