BetaSkillsOperations Class
Warning
DO NOT instantiate this class directly.
Instead, you should access the following operations through
<xref:skills> attribute.
Constructor
BetaSkillsOperations(*args, **kwargs)
Methods
| create |
Creates a skill. |
| create_from_package |
Creates a skill from a zip package. |
| delete |
Deletes a skill. |
| download |
Downloads a skill package. |
| get |
Retrieves a skill. |
| list |
Returns the list of all skills. |
| update |
Updates an existing skill. |
create
Creates a skill.
async create(*, name: str, content_type: str = 'application/json', description: str | None = None, instructions: str | None = None, metadata: dict[str, str] | None = None, **kwargs: Any) -> _models.SkillObject
Parameters
| Name | Description |
|---|---|
|
body
|
Is either a JSON type or a IO[bytes] type. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
name
|
The unique name of the skill. Required. Default value: <object object at 0x00000210BA37F9C0>
|
|
description
|
A human-readable description of the skill. Default value is None. Default value: None
|
|
instructions
|
Instructions that define the behavior of the skill. Default value is None. Default value: None
|
|
metadata
|
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
SkillObject. The SkillObject is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
create_from_package
Creates a skill from a zip package.
async create_from_package(body: bytes, **kwargs: Any) -> SkillObject
Parameters
| Name | Description |
|---|---|
|
body
Required
|
The zip package used to create the skill. Required. |
Returns
| Type | Description |
|---|---|
|
SkillObject. The SkillObject is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
delete
Deletes a skill.
async delete(name: str, **kwargs: Any) -> DeleteSkillResponse
Parameters
| Name | Description |
|---|---|
|
name
Required
|
The unique name of the skill. Required. |
Returns
| Type | Description |
|---|---|
|
DeleteSkillResponse. The DeleteSkillResponse is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
download
Downloads a skill package.
async download(name: str, **kwargs: Any) -> AsyncIterator[bytes]
Parameters
| Name | Description |
|---|---|
|
name
Required
|
The unique name of the skill. Required. |
Returns
| Type | Description |
|---|---|
|
AsyncIterator[bytes] |
Exceptions
| Type | Description |
|---|---|
get
Retrieves a skill.
async get(name: str, **kwargs: Any) -> SkillObject
Parameters
| Name | Description |
|---|---|
|
name
Required
|
The unique name of the skill. Required. |
Returns
| Type | Description |
|---|---|
|
SkillObject. The SkillObject is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|
list
Returns the list of all skills.
list(*, limit: int | None = None, order: str | PageOrder | None = None, before: str | None = None, **kwargs: Any) -> AsyncItemPaged[SkillObject]
Keyword-Only Parameters
| Name | Description |
|---|---|
|
limit
|
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. Default value is None. Default value: None
|
|
order
|
Sort order by the Default value: None
|
|
before
|
A cursor for use in pagination. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An iterator like instance of SkillObject |
Exceptions
| Type | Description |
|---|---|
update
Updates an existing skill.
async update(name: str, *, content_type: str = 'application/json', description: str | None = None, instructions: str | None = None, metadata: dict[str, str] | None = None, **kwargs: Any) -> _models.SkillObject
Parameters
| Name | Description |
|---|---|
|
name
Required
|
The unique name of the skill. Required. |
|
body
|
Is either a JSON type or a IO[bytes] type. Required. |
Keyword-Only Parameters
| Name | Description |
|---|---|
|
description
|
A human-readable description of the skill. Default value is None. Default value: None
|
|
instructions
|
Instructions that define the behavior of the skill. Default value is None. Default value: None
|
|
metadata
|
Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. Default value is None. Default value: None
|
Returns
| Type | Description |
|---|---|
|
SkillObject. The SkillObject is compatible with MutableMapping |
Exceptions
| Type | Description |
|---|---|