Delete thread
Deprecated
ThreadDeleted beta().threads().delete(ThreadDeleteParamsparams = ThreadDeleteParams.none(), RequestOptionsrequestOptions = RequestOptions.none())
DELETE/threads/{thread_id}
Delete a thread.
Parameters
Returns
Delete thread
package com.openai.example;
import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.beta.threads.ThreadDeleteParams;
import com.openai.models.beta.threads.ThreadDeleted;
public final class Main {
private Main() {}
public static void main(String[] args) {
OpenAIClient client = OpenAIOkHttpClient.fromEnv();
ThreadDeleted threadDeleted = client.beta().threads().delete("thread_id");
}
}{
"id": "id",
"deleted": true,
"object": "thread.deleted"
}Returns Examples
{
"id": "id",
"deleted": true,
"object": "thread.deleted"
}