Retrieve a ChatKit thread
client.Beta.ChatKit.Threads.Get(ctx, threadID) (*ChatKitThread, error)
GET
/chatkit/threads/{thread_id}Retrieve a ChatKit thread by its identifier.
Retrieve a ChatKit thread
package main
import (
"context"
"fmt"
"github.com/openai/openai-go"
)
func main() {
client := openai.NewClient()
chatkitThread, err := client.Beta.ChatKit.Threads.Get(context.TODO(), "cthr_123")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", chatkitThread.ID)
}
Response example
{
"id": "cthr_abc123",
"object": "chatkit.thread",
"title": "Customer escalation",
"created_at": 1712345600,
"status": {
"type": "active"
},
"user": "user_123"
}
Returns Examples
Response example
{
"id": "cthr_abc123",
"object": "chatkit.thread",
"title": "Customer escalation",
"created_at": 1712345600,
"status": {
"type": "active"
},
"user": "user_123"
}