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": "id",
"created_at": 0,
"metadata": {
"foo": "string"
},
"object": "thread",
"tool_resources": {
"code_interpreter": {
"file_ids": [
"string"
]
},
"file_search": {
"vector_store_ids": [
"string"
]
}
}
}Returns Examples
{
"id": "id",
"created_at": 0,
"metadata": {
"foo": "string"
},
"object": "thread",
"tool_resources": {
"code_interpreter": {
"file_ids": [
"string"
]
},
"file_search": {
"vector_store_ids": [
"string"
]
}
}
}