Delete 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.
Parameters
threadID string
Returns
Delete 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": "id",
"deleted": true,
"object": "chatkit.thread.deleted"
}Returns Examples
{
"id": "id",
"deleted": true,
"object": "chatkit.thread.deleted"
}