Delete thread
Deprecated
client.beta.threads.delete(stringthreadID, RequestOptionsoptions?): ThreadDeleted { id, deleted, object }
DELETE/threads/{thread_id}
Delete thread
import OpenAI from "openai";
const openai = new OpenAI();
async function main() {
const response = await openai.beta.threads.delete("thread_abc123");
console.log(response);
}
main();{
"id": "thread_abc123",
"object": "thread.deleted",
"deleted": true
}
Returns Examples
{
"id": "thread_abc123",
"object": "thread.deleted",
"deleted": true
}