Delete a fine-tuned model
client.Models.Delete(ctx, model) (*ModelDeleted, error)
DELETE/models/{model}
Delete a fine-tuned model. You must have the Owner role in your organization to delete a model.
Parameters
model string
Returns
Delete a fine-tuned model
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"),
)
modelDeleted, err := client.Models.Delete(context.TODO(), "ft:gpt-4o-mini:acemeco:suffix:abc123")
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", modelDeleted.ID)
}
{
"id": "id",
"deleted": true,
"object": "object"
}Returns Examples
{
"id": "id",
"deleted": true,
"object": "object"
}