Skip to content

List Skill Versions

client.Skills.Versions.List(ctx, skillID, query) (*CursorPage[SkillVersion], error)
GET/skills/{skill_id}/versions

List Skill Versions

ParametersExpand Collapse
skillID string
query SkillVersionListParams
After param.Field[string]optional

The skill version ID to start after.

Limit param.Field[int64]optional

Number of versions to retrieve.

minimum0
maximum100
Order param.Field[SkillVersionListParamsOrder]optional

Sort order of results by version number.

const SkillVersionListParamsOrderAsc SkillVersionListParamsOrder = "asc"
const SkillVersionListParamsOrderDesc SkillVersionListParamsOrder = "desc"
ReturnsExpand Collapse
type SkillVersion struct{…}
ID string

Unique identifier for the skill version.

CreatedAt int64

Unix timestamp (seconds) for when the version was created.

Description string

Description of the skill version.

Name string

Name of the skill version.

Object SkillVersion

The object type, which is skill.version.

SkillID string

Identifier of the skill for this version.

Version string

Version number for this skill.

List Skill Versions

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"),
  )
  page, err := client.Skills.Versions.List(
    context.TODO(),
    "skill_123",
    openai.SkillVersionListParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "data": [
    {
      "id": "id",
      "created_at": 0,
      "description": "description",
      "name": "name",
      "object": "skill.version",
      "skill_id": "skill_id",
      "version": "version"
    }
  ],
  "first_id": "first_id",
  "has_more": true,
  "last_id": "last_id",
  "object": "list"
}
Returns Examples
{
  "data": [
    {
      "id": "id",
      "created_at": 0,
      "description": "description",
      "name": "name",
      "object": "skill.version",
      "skill_id": "skill_id",
      "version": "version"
    }
  ],
  "first_id": "first_id",
  "has_more": true,
  "last_id": "last_id",
  "object": "list"
}