Modify thread
Deprecated
client.Beta.Threads.Update(ctx, threadID, body) (*Thread, error)
POST/threads/{thread_id}
Modifies a thread.
Parameters
threadID string
Returns
Modify thread
package main
import (
"context"
"fmt"
"github.com/openai/openai-go"
"github.com/openai/openai-go/option"
)
func main() {
client := openai.NewClient(
option.WithAPIKey("My API Key"),
)
thread, err := client.Beta.Threads.Update(
context.TODO(),
"thread_id",
openai.BetaThreadUpdateParams{
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", thread.ID)
}
{
"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": {}
}