🌍 Global Mirror — Visit original CN site →
Skip to content
Primary navigation

List all skills for the current project.

client.Skills.List(ctx, query) (*CursorPage[Skill], error)
GET/skills

List all skills for the current project.

ParametersExpand Collapse
query SkillListParams
After param.Field[string]optional

Identifier for the last item from the previous pagination request

Limit param.Field[int64]optional

Number of items to retrieve

minimum0
maximum100
Order param.Field[SkillListParamsOrder]optional

Sort order of results by timestamp. Use asc for ascending order or desc for descending order.

const SkillListParamsOrderAsc SkillListParamsOrder = "asc"
const SkillListParamsOrderDesc SkillListParamsOrder = "desc"
ReturnsExpand Collapse
type Skill struct{…}
ID string

Unique identifier for the skill.

CreatedAt int64

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

DefaultVersion string

Default version for the skill.

Description string

Description of the skill.

LatestVersion string

Latest version for the skill.

Name string

Name of the skill.

Object Skill

The object type, which is skill.

List all skills for the current project.

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.List(context.TODO(), openai.SkillListParams{

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