運行を取りやめます。
POST
https://api.openai.com/v1/threads/{thread_id}/runs/{run_id}/cancel
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Path Params
thread_id
string
required
run_id
string
required
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.openai.com/v1/threads//runs//cancel'
Responses
🟢200成功
application/json
Body
id
string
required
object
string
required
created_at
integer
required
assistant_id
string
required
thread_id
string
required
status
string
required
started_at
integer
required
expires_at
integer
required
cancelled_at
null
required
failed_at
null
required
completed_at
null
required
last_error
null
required
model
string
required
instructions
string
required
tools
array [object {1}]
required
type
string
optional
file_ids
array[string]
required
metadata
object
required
Example
{
"id": "run_BeRGmpGt2wb1VI22ZRniOkrR",
"object": "thread.run",
"created_at": 1699076126,
"assistant_id": "asst_IgmpQTah3ZfPHCVZjTqAY8Kv",
"thread_id": "thread_1cjnJPXj8MFiqTx58jU9TivC",
"status": "cancelling",
"started_at": 1699076126,
"expires_at": 1699076726,
"cancelled_at": null,
"failed_at": null,
"completed_at": null,
"last_error": null,
"model": "gpt-4",
"instructions": "You summarize books.",
"tools": [
{
"type": "retrieval"
}
],
"file_ids": [],
"metadata": {}
}
Modified at 2024-12-17 03:49:28