Modify thread
Deprecated
client.beta.threads.update(stringthreadID, ThreadUpdateParams { metadata, tool_resources } body, RequestOptionsoptions?): Thread { id, created_at, metadata, 2 more }
POST/threads/{thread_id}
Modify thread
import OpenAI from "openai";
const openai = new OpenAI();
async function main() {
const updatedThread = await openai.beta.threads.update(
"thread_abc123",
{
metadata: { modified: "true", user: "abc123" },
}
);
console.log(updatedThread);
}
main();{
"id": "thread_abc123",
"object": "thread",
"created_at": 1699014083,
"metadata": {
"modified": "true",
"user": "abc123"
},
"tool_resources": {}
}
Returns Examples
{
"id": "thread_abc123",
"object": "thread",
"created_at": 1699014083,
"metadata": {
"modified": "true",
"user": "abc123"
},
"tool_resources": {}
}