Skip to content

release: 1.81.0 #2368

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.80.0"
".": "1.81.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 101
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-a5651cb97f86d1e2531af6aef8c5230f1ea350560fbae790ca2e481b30a6c217.yml
openapi_spec_hash: 66a5104fd3bb43383cf919225df7a6fd
config_hash: bb657c3fed232a56930035de3aaed936
configured_endpoints: 111
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-6af14840a810139bf407013167ce1c8fb21b6ef8eb0cc3db58b51af7d52c4b5a.yml
openapi_spec_hash: 3241bde6b273cfec0035e522bd07985d
config_hash: 7367b68a4e7db36885c1a886f57b17f6
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.81.0 (2025-05-21)

Full Changelog: [v1.80.0...v1.81.0](https://github.com/openai/openai-python/compare/v1.80.0...v1.81.0)

### Features

* **api:** add container endpoint ([054a210](https://github.com/openai/openai-python/commit/054a210289d7e0db22d2d2a61bbe4d4d9cc0cb47))

## 1.80.0 (2025-05-21)

Full Changelog: [v1.79.0...v1.80.0](https://github.com/openai/openai-python/compare/v1.79.0...v1.80.0)
Expand Down
37 changes: 37 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,7 @@ Methods:
- <code title="post /responses">client.responses.<a href="./src/openai/resources/responses/responses.py">create</a>(\*\*<a href="src/openai/types/responses/response_create_params.py">params</a>) -> <a href="./src/openai/types/responses/response.py">Response</a></code>
- <code title="get /responses/{response_id}">client.responses.<a href="./src/openai/resources/responses/responses.py">retrieve</a>(response_id, \*\*<a href="src/openai/types/responses/response_retrieve_params.py">params</a>) -> <a href="./src/openai/types/responses/response.py">Response</a></code>
- <code title="delete /responses/{response_id}">client.responses.<a href="./src/openai/resources/responses/responses.py">delete</a>(response_id) -> None</code>
- <code title="post /responses/{response_id}/cancel">client.responses.<a href="./src/openai/resources/responses/responses.py">cancel</a>(response_id) -> None</code>

## InputItems

Expand Down Expand Up @@ -859,3 +860,39 @@ Methods:

- <code title="get /evals/{eval_id}/runs/{run_id}/output_items/{output_item_id}">client.evals.runs.output_items.<a href="./src/openai/resources/evals/runs/output_items.py">retrieve</a>(output_item_id, \*, eval_id, run_id) -> <a href="./src/openai/types/evals/runs/output_item_retrieve_response.py">OutputItemRetrieveResponse</a></code>
- <code title="get /evals/{eval_id}/runs/{run_id}/output_items">client.evals.runs.output_items.<a href="./src/openai/resources/evals/runs/output_items.py">list</a>(run_id, \*, eval_id, \*\*<a href="src/openai/types/evals/runs/output_item_list_params.py">params</a>) -> <a href="./src/openai/types/evals/runs/output_item_list_response.py">SyncCursorPage[OutputItemListResponse]</a></code>

# Containers

Types:

```python
from openai.types import ContainerCreateResponse, ContainerRetrieveResponse, ContainerListResponse
```

Methods:

- <code title="post /containers">client.containers.<a href="./src/openai/resources/containers/containers.py">create</a>(\*\*<a href="src/openai/types/container_create_params.py">params</a>) -> <a href="./src/openai/types/container_create_response.py">ContainerCreateResponse</a></code>
- <code title="get /containers/{container_id}">client.containers.<a href="./src/openai/resources/containers/containers.py">retrieve</a>(container_id) -> <a href="./src/openai/types/container_retrieve_response.py">ContainerRetrieveResponse</a></code>
- <code title="get /containers">client.containers.<a href="./src/openai/resources/containers/containers.py">list</a>(\*\*<a href="src/openai/types/container_list_params.py">params</a>) -> <a href="./src/openai/types/container_list_response.py">SyncCursorPage[ContainerListResponse]</a></code>
- <code title="delete /containers/{container_id}">client.containers.<a href="./src/openai/resources/containers/containers.py">delete</a>(container_id) -> None</code>

## Files

Types:

```python
from openai.types.containers import FileCreateResponse, FileRetrieveResponse, FileListResponse
```

Methods:

- <code title="post /containers/{container_id}/files">client.containers.files.<a href="./src/openai/resources/containers/files/files.py">create</a>(container_id, \*\*<a href="src/openai/types/containers/file_create_params.py">params</a>) -> <a href="./src/openai/types/containers/file_create_response.py">FileCreateResponse</a></code>
- <code title="get /containers/{container_id}/files/{file_id}">client.containers.files.<a href="./src/openai/resources/containers/files/files.py">retrieve</a>(file_id, \*, container_id) -> <a href="./src/openai/types/containers/file_retrieve_response.py">FileRetrieveResponse</a></code>
- <code title="get /containers/{container_id}/files">client.containers.files.<a href="./src/openai/resources/containers/files/files.py">list</a>(container_id, \*\*<a href="src/openai/types/containers/file_list_params.py">params</a>) -> <a href="./src/openai/types/containers/file_list_response.py">SyncCursorPage[FileListResponse]</a></code>
- <code title="delete /containers/{container_id}/files/{file_id}">client.containers.files.<a href="./src/openai/resources/containers/files/files.py">delete</a>(file_id, \*, container_id) -> None</code>

### Content

Methods:

- <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) -> None</code>
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "openai"
version = "1.80.0"
version = "1.81.0"
description = "The official Python library for the openai API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
1 change: 1 addition & 0 deletions src/openai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ def _reset_client() -> None: # type: ignore[reportUnusedFunction]
batches as batches,
uploads as uploads,
responses as responses,
containers as containers,
embeddings as embeddings,
completions as completions,
fine_tuning as fine_tuning,
Expand Down
38 changes: 38 additions & 0 deletions src/openai/_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
batches,
uploads,
responses,
containers,
embeddings,
completions,
fine_tuning,
Expand All @@ -65,6 +66,7 @@
from .resources.moderations import Moderations, AsyncModerations
from .resources.uploads.uploads import Uploads, AsyncUploads
from .resources.responses.responses import Responses, AsyncResponses
from .resources.containers.containers import Containers, AsyncContainers
from .resources.fine_tuning.fine_tuning import FineTuning, AsyncFineTuning
from .resources.vector_stores.vector_stores import VectorStores, AsyncVectorStores

Expand Down Expand Up @@ -244,6 +246,12 @@ def evals(self) -> Evals:

return Evals(self)

@cached_property
def containers(self) -> Containers:
from .resources.containers import Containers

return Containers(self)

@cached_property
def with_raw_response(self) -> OpenAIWithRawResponse:
return OpenAIWithRawResponse(self)
Expand Down Expand Up @@ -539,6 +547,12 @@ def evals(self) -> AsyncEvals:

return AsyncEvals(self)

@cached_property
def containers(self) -> AsyncContainers:
from .resources.containers import AsyncContainers

return AsyncContainers(self)

@cached_property
def with_raw_response(self) -> AsyncOpenAIWithRawResponse:
return AsyncOpenAIWithRawResponse(self)
Expand Down Expand Up @@ -757,6 +771,12 @@ def evals(self) -> evals.EvalsWithRawResponse:

return EvalsWithRawResponse(self._client.evals)

@cached_property
def containers(self) -> containers.ContainersWithRawResponse:
from .resources.containers import ContainersWithRawResponse

return ContainersWithRawResponse(self._client.containers)


class AsyncOpenAIWithRawResponse:
_client: AsyncOpenAI
Expand Down Expand Up @@ -854,6 +874,12 @@ def evals(self) -> evals.AsyncEvalsWithRawResponse:

return AsyncEvalsWithRawResponse(self._client.evals)

@cached_property
def containers(self) -> containers.AsyncContainersWithRawResponse:
from .resources.containers import AsyncContainersWithRawResponse

return AsyncContainersWithRawResponse(self._client.containers)


class OpenAIWithStreamedResponse:
_client: OpenAI
Expand Down Expand Up @@ -951,6 +977,12 @@ def evals(self) -> evals.EvalsWithStreamingResponse:

return EvalsWithStreamingResponse(self._client.evals)

@cached_property
def containers(self) -> containers.ContainersWithStreamingResponse:
from .resources.containers import ContainersWithStreamingResponse

return ContainersWithStreamingResponse(self._client.containers)


class AsyncOpenAIWithStreamedResponse:
_client: AsyncOpenAI
Expand Down Expand Up @@ -1048,6 +1080,12 @@ def evals(self) -> evals.AsyncEvalsWithStreamingResponse:

return AsyncEvalsWithStreamingResponse(self._client.evals)

@cached_property
def containers(self) -> containers.AsyncContainersWithStreamingResponse:
from .resources.containers import AsyncContainersWithStreamingResponse

return AsyncContainersWithStreamingResponse(self._client.containers)


Client = OpenAI

Expand Down
8 changes: 8 additions & 0 deletions src/openai/_module_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from .resources.moderations import Moderations
from .resources.uploads.uploads import Uploads
from .resources.responses.responses import Responses
from .resources.containers.containers import Containers
from .resources.fine_tuning.fine_tuning import FineTuning
from .resources.vector_stores.vector_stores import VectorStores

Expand Down Expand Up @@ -92,6 +93,12 @@ def __load__(self) -> Embeddings:
return _load_client().embeddings


class ContainersProxy(LazyProxy["Containers"]):
@override
def __load__(self) -> Containers:
return _load_client().containers


class CompletionsProxy(LazyProxy["Completions"]):
@override
def __load__(self) -> Completions:
Expand Down Expand Up @@ -127,6 +134,7 @@ def __load__(self) -> VectorStores:
uploads: Uploads = UploadsProxy().__as_proxied__()
responses: Responses = ResponsesProxy().__as_proxied__()
embeddings: Embeddings = EmbeddingsProxy().__as_proxied__()
containers: Containers = ContainersProxy().__as_proxied__()
completions: Completions = CompletionsProxy().__as_proxied__()
moderations: Moderations = ModerationsProxy().__as_proxied__()
fine_tuning: FineTuning = FineTuningProxy().__as_proxied__()
Expand Down
2 changes: 1 addition & 1 deletion src/openai/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "openai"
__version__ = "1.80.0" # x-release-please-version
__version__ = "1.81.0" # x-release-please-version
4 changes: 4 additions & 0 deletions src/openai/lib/streaming/responses/_responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ def handle_event(self, event: RawResponseStreamEvent) -> List[ResponseStreamEven
delta=event.delta,
item_id=event.item_id,
output_index=event.output_index,
sequence_number=event.sequence_number,
type="response.output_text.delta",
snapshot=content.text,
)
Expand All @@ -268,6 +269,7 @@ def handle_event(self, event: RawResponseStreamEvent) -> List[ResponseStreamEven
content_index=event.content_index,
item_id=event.item_id,
output_index=event.output_index,
sequence_number=event.sequence_number,
type="response.output_text.done",
text=event.text,
parsed=parse_text(event.text, text_format=self._text_format),
Expand All @@ -283,6 +285,7 @@ def handle_event(self, event: RawResponseStreamEvent) -> List[ResponseStreamEven
delta=event.delta,
item_id=event.item_id,
output_index=event.output_index,
sequence_number=event.sequence_number,
type="response.function_call_arguments.delta",
snapshot=output.arguments,
)
Expand All @@ -295,6 +298,7 @@ def handle_event(self, event: RawResponseStreamEvent) -> List[ResponseStreamEven
events.append(
build(
ResponseCompletedEvent,
sequence_number=event.sequence_number,
type="response.completed",
response=response,
)
Expand Down
14 changes: 14 additions & 0 deletions src/openai/resources/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,14 @@
UploadsWithStreamingResponse,
AsyncUploadsWithStreamingResponse,
)
from .containers import (
Containers,
AsyncContainers,
ContainersWithRawResponse,
AsyncContainersWithRawResponse,
ContainersWithStreamingResponse,
AsyncContainersWithStreamingResponse,
)
from .embeddings import (
Embeddings,
AsyncEmbeddings,
Expand Down Expand Up @@ -198,4 +206,10 @@
"AsyncEvalsWithRawResponse",
"EvalsWithStreamingResponse",
"AsyncEvalsWithStreamingResponse",
"Containers",
"AsyncContainers",
"ContainersWithRawResponse",
"AsyncContainersWithRawResponse",
"ContainersWithStreamingResponse",
"AsyncContainersWithStreamingResponse",
]
33 changes: 33 additions & 0 deletions src/openai/resources/containers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from .files import (
Files,
AsyncFiles,
FilesWithRawResponse,
AsyncFilesWithRawResponse,
FilesWithStreamingResponse,
AsyncFilesWithStreamingResponse,
)
from .containers import (
Containers,
AsyncContainers,
ContainersWithRawResponse,
AsyncContainersWithRawResponse,
ContainersWithStreamingResponse,
AsyncContainersWithStreamingResponse,
)

__all__ = [
"Files",
"AsyncFiles",
"FilesWithRawResponse",
"AsyncFilesWithRawResponse",
"FilesWithStreamingResponse",
"AsyncFilesWithStreamingResponse",
"Containers",
"AsyncContainers",
"ContainersWithRawResponse",
"AsyncContainersWithRawResponse",
"ContainersWithStreamingResponse",
"AsyncContainersWithStreamingResponse",
]
Loading
Loading