Skip to content

Commit b3c7207

Browse files
feat(api): skills and hosted shell
1 parent 57d7fe7 commit b3c7207

65 files changed

Lines changed: 3628 additions & 82 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 137
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-bff810f46da56eff8d5e189b0d1f56ac07a8289723666138549d4239cad7c2ea.yml
3-
openapi_spec_hash: 7532ce5a6f490c8f5d1e079c76c70535
4-
config_hash: a1454ffd9612dee11f9d5a98e55eac9e
1+
configured_endpoints: 148
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-7debfce2217c66ea87bfddaa244b57de4062dd7fd766fa9a28e869614205c040.yml
3+
openapi_spec_hash: e910fc478b8449134e2af1dc15fd33f7
4+
config_hash: 8dca0f2dc2706c07cf2f8d0ed4dc062e

api.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -736,11 +736,20 @@ from openai.types.responses import (
736736
ApplyPatchTool,
737737
CompactedResponse,
738738
ComputerTool,
739+
ContainerAuto,
740+
ContainerNetworkPolicyAllowlist,
741+
ContainerNetworkPolicyDisabled,
742+
ContainerNetworkPolicyDomainSecret,
743+
ContainerReference,
739744
CustomTool,
740745
EasyInputMessage,
741746
FileSearchTool,
742747
FunctionShellTool,
743748
FunctionTool,
749+
InlineSkill,
750+
InlineSkillSource,
751+
LocalEnvironment,
752+
LocalSkill,
744753
Response,
745754
ResponseApplyPatchToolCall,
746755
ResponseApplyPatchToolCallOutput,
@@ -760,6 +769,7 @@ from openai.types.responses import (
760769
ResponseComputerToolCall,
761770
ResponseComputerToolCallOutputItem,
762771
ResponseComputerToolCallOutputScreenshot,
772+
ResponseContainerReference,
763773
ResponseContent,
764774
ResponseContentPartAddedEvent,
765775
ResponseContentPartDoneEvent,
@@ -809,6 +819,7 @@ from openai.types.responses import (
809819
ResponseInputText,
810820
ResponseInputTextContent,
811821
ResponseItem,
822+
ResponseLocalEnvironment,
812823
ResponseMcpCallArgumentsDeltaEvent,
813824
ResponseMcpCallArgumentsDoneEvent,
814825
ResponseMcpCallCompletedEvent,
@@ -845,6 +856,7 @@ from openai.types.responses import (
845856
ResponseWebSearchCallCompletedEvent,
846857
ResponseWebSearchCallInProgressEvent,
847858
ResponseWebSearchCallSearchingEvent,
859+
SkillReference,
848860
Tool,
849861
ToolChoiceAllowed,
850862
ToolChoiceApplyPatch,
@@ -1170,6 +1182,49 @@ Methods:
11701182

11711183
- <code title="get /containers/{container_id}/files/{file_id}/content">client.containers.files.content.<a href="./src/openai/resources/containers/files/content.py">retrieve</a>(file_id, \*, container_id) -> HttpxBinaryResponseContent</code>
11721184

1185+
# Skills
1186+
1187+
Types:
1188+
1189+
```python
1190+
from openai.types import DeletedSkill, Skill, SkillList
1191+
```
1192+
1193+
Methods:
1194+
1195+
- <code title="post /skills">client.skills.<a href="./src/openai/resources/skills/skills.py">create</a>(\*\*<a href="src/openai/types/skill_create_params.py">params</a>) -> <a href="./src/openai/types/skill.py">Skill</a></code>
1196+
- <code title="get /skills/{skill_id}">client.skills.<a href="./src/openai/resources/skills/skills.py">retrieve</a>(skill_id) -> <a href="./src/openai/types/skill.py">Skill</a></code>
1197+
- <code title="post /skills/{skill_id}">client.skills.<a href="./src/openai/resources/skills/skills.py">update</a>(skill_id, \*\*<a href="src/openai/types/skill_update_params.py">params</a>) -> <a href="./src/openai/types/skill.py">Skill</a></code>
1198+
- <code title="get /skills">client.skills.<a href="./src/openai/resources/skills/skills.py">list</a>(\*\*<a href="src/openai/types/skill_list_params.py">params</a>) -> <a href="./src/openai/types/skill.py">SyncCursorPage[Skill]</a></code>
1199+
- <code title="delete /skills/{skill_id}">client.skills.<a href="./src/openai/resources/skills/skills.py">delete</a>(skill_id) -> <a href="./src/openai/types/deleted_skill.py">DeletedSkill</a></code>
1200+
1201+
## Content
1202+
1203+
Methods:
1204+
1205+
- <code title="get /skills/{skill_id}/content">client.skills.content.<a href="./src/openai/resources/skills/content.py">retrieve</a>(skill_id) -> HttpxBinaryResponseContent</code>
1206+
1207+
## Versions
1208+
1209+
Types:
1210+
1211+
```python
1212+
from openai.types.skills import DeletedSkillVersion, SkillVersion, SkillVersionList
1213+
```
1214+
1215+
Methods:
1216+
1217+
- <code title="post /skills/{skill_id}/versions">client.skills.versions.<a href="./src/openai/resources/skills/versions/versions.py">create</a>(skill_id, \*\*<a href="src/openai/types/skills/version_create_params.py">params</a>) -> <a href="./src/openai/types/skills/skill_version.py">SkillVersion</a></code>
1218+
- <code title="get /skills/{skill_id}/versions/{version}">client.skills.versions.<a href="./src/openai/resources/skills/versions/versions.py">retrieve</a>(version, \*, skill_id) -> <a href="./src/openai/types/skills/skill_version.py">SkillVersion</a></code>
1219+
- <code title="get /skills/{skill_id}/versions">client.skills.versions.<a href="./src/openai/resources/skills/versions/versions.py">list</a>(skill_id, \*\*<a href="src/openai/types/skills/version_list_params.py">params</a>) -> <a href="./src/openai/types/skills/skill_version.py">SyncCursorPage[SkillVersion]</a></code>
1220+
- <code title="delete /skills/{skill_id}/versions/{version}">client.skills.versions.<a href="./src/openai/resources/skills/versions/versions.py">delete</a>(version, \*, skill_id) -> <a href="./src/openai/types/skills/deleted_skill_version.py">DeletedSkillVersion</a></code>
1221+
1222+
### Content
1223+
1224+
Methods:
1225+
1226+
- <code title="get /skills/{skill_id}/versions/{version}/content">client.skills.versions.content.<a href="./src/openai/resources/skills/versions/content.py">retrieve</a>(version, \*, skill_id) -> HttpxBinaryResponseContent</code>
1227+
11731228
# Videos
11741229

11751230
Types:

src/openai/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ def _reset_client() -> None: # type: ignore[reportUnusedFunction]
379379
files as files,
380380
images as images,
381381
models as models,
382+
skills as skills,
382383
videos as videos,
383384
batches as batches,
384385
uploads as uploads,

src/openai/_client.py

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
files,
4545
images,
4646
models,
47+
skills,
4748
videos,
4849
batches,
4950
uploads,
@@ -70,6 +71,7 @@
7071
from .resources.completions import Completions, AsyncCompletions
7172
from .resources.evals.evals import Evals, AsyncEvals
7273
from .resources.moderations import Moderations, AsyncModerations
74+
from .resources.skills.skills import Skills, AsyncSkills
7375
from .resources.uploads.uploads import Uploads, AsyncUploads
7476
from .resources.realtime.realtime import Realtime, AsyncRealtime
7577
from .resources.responses.responses import Responses, AsyncResponses
@@ -290,6 +292,12 @@ def containers(self) -> Containers:
290292

291293
return Containers(self)
292294

295+
@cached_property
296+
def skills(self) -> Skills:
297+
from .resources.skills import Skills
298+
299+
return Skills(self)
300+
293301
@cached_property
294302
def videos(self) -> Videos:
295303
from .resources.videos import Videos
@@ -641,6 +649,12 @@ def containers(self) -> AsyncContainers:
641649

642650
return AsyncContainers(self)
643651

652+
@cached_property
653+
def skills(self) -> AsyncSkills:
654+
from .resources.skills import AsyncSkills
655+
656+
return AsyncSkills(self)
657+
644658
@cached_property
645659
def videos(self) -> AsyncVideos:
646660
from .resources.videos import AsyncVideos
@@ -897,6 +911,12 @@ def containers(self) -> containers.ContainersWithRawResponse:
897911

898912
return ContainersWithRawResponse(self._client.containers)
899913

914+
@cached_property
915+
def skills(self) -> skills.SkillsWithRawResponse:
916+
from .resources.skills import SkillsWithRawResponse
917+
918+
return SkillsWithRawResponse(self._client.skills)
919+
900920
@cached_property
901921
def videos(self) -> videos.VideosWithRawResponse:
902922
from .resources.videos import VideosWithRawResponse
@@ -1018,6 +1038,12 @@ def containers(self) -> containers.AsyncContainersWithRawResponse:
10181038

10191039
return AsyncContainersWithRawResponse(self._client.containers)
10201040

1041+
@cached_property
1042+
def skills(self) -> skills.AsyncSkillsWithRawResponse:
1043+
from .resources.skills import AsyncSkillsWithRawResponse
1044+
1045+
return AsyncSkillsWithRawResponse(self._client.skills)
1046+
10211047
@cached_property
10221048
def videos(self) -> videos.AsyncVideosWithRawResponse:
10231049
from .resources.videos import AsyncVideosWithRawResponse
@@ -1139,6 +1165,12 @@ def containers(self) -> containers.ContainersWithStreamingResponse:
11391165

11401166
return ContainersWithStreamingResponse(self._client.containers)
11411167

1168+
@cached_property
1169+
def skills(self) -> skills.SkillsWithStreamingResponse:
1170+
from .resources.skills import SkillsWithStreamingResponse
1171+
1172+
return SkillsWithStreamingResponse(self._client.skills)
1173+
11421174
@cached_property
11431175
def videos(self) -> videos.VideosWithStreamingResponse:
11441176
from .resources.videos import VideosWithStreamingResponse
@@ -1260,6 +1292,12 @@ def containers(self) -> containers.AsyncContainersWithStreamingResponse:
12601292

12611293
return AsyncContainersWithStreamingResponse(self._client.containers)
12621294

1295+
@cached_property
1296+
def skills(self) -> skills.AsyncSkillsWithStreamingResponse:
1297+
from .resources.skills import AsyncSkillsWithStreamingResponse
1298+
1299+
return AsyncSkillsWithStreamingResponse(self._client.skills)
1300+
12631301
@cached_property
12641302
def videos(self) -> videos.AsyncVideosWithStreamingResponse:
12651303
from .resources.videos import AsyncVideosWithStreamingResponse

src/openai/_module_client.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from .resources.completions import Completions
2020
from .resources.evals.evals import Evals
2121
from .resources.moderations import Moderations
22+
from .resources.skills.skills import Skills
2223
from .resources.uploads.uploads import Uploads
2324
from .resources.realtime.realtime import Realtime
2425
from .resources.responses.responses import Responses
@@ -73,6 +74,12 @@ def __load__(self) -> Models:
7374
return _load_client().models
7475

7576

77+
class SkillsProxy(LazyProxy["Skills"]):
78+
@override
79+
def __load__(self) -> Skills:
80+
return _load_client().skills
81+
82+
7683
class VideosProxy(LazyProxy["Videos"]):
7784
@override
7885
def __load__(self) -> Videos:
@@ -158,6 +165,7 @@ def __load__(self) -> Conversations:
158165
evals: Evals = EvalsProxy().__as_proxied__()
159166
images: Images = ImagesProxy().__as_proxied__()
160167
models: Models = ModelsProxy().__as_proxied__()
168+
skills: Skills = SkillsProxy().__as_proxied__()
161169
videos: Videos = VideosProxy().__as_proxied__()
162170
batches: Batches = BatchesProxy().__as_proxied__()
163171
uploads: Uploads = UploadsProxy().__as_proxied__()

src/openai/resources/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@
5656
ModelsWithStreamingResponse,
5757
AsyncModelsWithStreamingResponse,
5858
)
59+
from .skills import (
60+
Skills,
61+
AsyncSkills,
62+
SkillsWithRawResponse,
63+
AsyncSkillsWithRawResponse,
64+
SkillsWithStreamingResponse,
65+
AsyncSkillsWithStreamingResponse,
66+
)
5967
from .videos import (
6068
Videos,
6169
AsyncVideos,
@@ -220,6 +228,12 @@
220228
"AsyncContainersWithRawResponse",
221229
"ContainersWithStreamingResponse",
222230
"AsyncContainersWithStreamingResponse",
231+
"Skills",
232+
"AsyncSkills",
233+
"SkillsWithRawResponse",
234+
"AsyncSkillsWithRawResponse",
235+
"SkillsWithStreamingResponse",
236+
"AsyncSkillsWithStreamingResponse",
223237
"Videos",
224238
"AsyncVideos",
225239
"VideosWithRawResponse",

0 commit comments

Comments
 (0)