Skip to content

Delete Skill

client.Skills.Delete(ctx, skillID) (*DeletedSkill, error)
DELETE/skills/{skill_id}

Delete Skill

ParametersExpand Collapse
skillID string
ReturnsExpand Collapse
type DeletedSkill struct{…}
ID string
Deleted bool
Object SkillDeleted

Delete Skill

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"),
  )
  deletedSkill, err := client.Skills.Delete(context.TODO(), "skill_123")
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", deletedSkill.ID)
}
{
  "id": "id",
  "deleted": true,
  "object": "skill.deleted"
}
Returns Examples
{
  "id": "id",
  "deleted": true,
  "object": "skill.deleted"
}