Delete assistant
Deprecated
client.Beta.Assistants.Delete(ctx, assistantID) (*AssistantDeleted, error)
DELETE/assistants/{assistant_id}
Delete an assistant.
Parameters
assistantID string
Returns
Delete assistant
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"),
)
assistantDeleted, err := client.Beta.Assistants.Delete(context.TODO(), "assistant_id")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", assistantDeleted.ID)
}
{
"id": "id",
"deleted": true,
"object": "assistant.deleted"
}Returns Examples
{
"id": "id",
"deleted": true,
"object": "assistant.deleted"
}