Implementation:Openai Openai python Skill List Model
| Knowledge Sources | |
|---|---|
| Domains | API_Types, Python |
| Last Updated | 2026-02-15 00:00 GMT |
Overview
Concrete tool for representing a paginated list of skill objects provided by the openai-python SDK.
Description
SkillList is a Pydantic BaseModel representing a paginated list response from the skills API. It contains a data list of Skill objects, first_id and last_id optional strings for cursor-based pagination boundaries, a has_more boolean indicating whether additional pages are available, and an object type field that is always "list".
Usage
Import SkillList when you need to type-annotate or inspect the paginated response from client.skills.list().
Code Reference
Source Location
- Repository: openai-python
- File: src/openai/types/skill_list.py
Signature
class SkillList(BaseModel):
data: List[Skill]
first_id: Optional[str] = None
has_more: bool
last_id: Optional[str] = None
object: Literal["list"]
Import
from openai.types import SkillList
I/O Contract
Fields
| Name | Type | Required | Description |
|---|---|---|---|
| data | List[Skill] | Yes | A list of Skill items. |
| first_id | Optional[str] | No | The ID of the first item in the list. |
| has_more | bool | Yes | Whether there are more items available beyond this page. |
| last_id | Optional[str] | No | The ID of the last item in the list. |
| object | Literal["list"] | Yes | The type of object returned, always "list". |
Usage Examples
from openai import OpenAI
from openai.types import SkillList
client = OpenAI()
# Fetch a paginated list of skills
skill_list: SkillList = client.skills.list(limit=10)
print(f"Retrieved {len(skill_list.data)} skills")
print(f"Has more: {skill_list.has_more}")
# Paginate through all skills
if skill_list.has_more and skill_list.last_id:
next_page = client.skills.list(after=skill_list.last_id, limit=10)
for skill in next_page.data:
print(f" {skill.name}: {skill.description}")