Delete a ChatKit thread
client.Beta.ChatKit.Threads.Delete(ctx, threadID) (*BetaChatKitThreadDeleteResponse, error)
DELETE/chatkit/threads/{thread_id}
Delete a ChatKit thread along with its items and stored attachments.
Delete a ChatKit thread
package main
import (
"context"
"fmt"
"github.com/openai/openai-go"
)
func main() {
client := openai.NewClient()
thread, err := client.Beta.ChatKit.Threads.Delete(context.TODO(), "cthr_123")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", thread.ID)
}
{
"id": "cthr_123",
"object": "chatkit.thread.deleted",
"deleted": true
}
Returns Examples
{
"id": "cthr_123",
"object": "chatkit.thread.deleted",
"deleted": true
}