Skip to content

Commit baa03b6

Browse files
authored
Merge branch 'main' into chore/client-comment-fix
2 parents 30e8f6d + 0c8343b commit baa03b6

File tree

77 files changed

+6345
-41
lines changed

Some content is hidden

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

77 files changed

+6345
-41
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ jobs:
5454
examples:
5555
name: examples
5656
runs-on: ubuntu-latest
57+
if: github.repository == 'openai/openai-python'
5758

5859
steps:
5960
- uses: actions/checkout@v4

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "1.69.0"
2+
".": "1.72.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 82
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-6663c59193eb95b201e492de17dcbd5e126ba03d18ce66287a3e2c632ca56fe7.yml
3-
openapi_spec_hash: 7996d2c34cc44fe2ce9ffe93c0ab774e
4-
config_hash: 9351ea829c2b41da3b48a38c934c92ee
1+
configured_endpoints: 97
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-32de3bc513663c5fac922c49be41c222b6ee8c0b841d8966bcdfa489d441daa3.yml
3+
openapi_spec_hash: ea86343b5e9858a74e85da8ab2c532f6
4+
config_hash: 43dc8df20ffec9d1503f91866cb2b7d9

CHANGELOG.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,48 @@
11
# Changelog
22

3+
## 1.72.0 (2025-04-08)
4+
5+
Full Changelog: [v1.71.0...v1.72.0](https://github.com/openai/openai-python/compare/v1.71.0...v1.72.0)
6+
7+
### Features
8+
9+
* **api:** Add evalapi to sdk ([#2287](https://github.com/openai/openai-python/issues/2287)) ([35262fc](https://github.com/openai/openai-python/commit/35262fcef6ccb7d1f75c9abdfdc68c3dcf87ef53))
10+
11+
12+
### Chores
13+
14+
* **internal:** fix examples ([#2288](https://github.com/openai/openai-python/issues/2288)) ([39defd6](https://github.com/openai/openai-python/commit/39defd61e81ea0ec6b898be12e9fb7e621c0e532))
15+
* **internal:** skip broken test ([#2289](https://github.com/openai/openai-python/issues/2289)) ([e2c9bce](https://github.com/openai/openai-python/commit/e2c9bce1f59686ee053b495d06ea118b4a89e09e))
16+
* **internal:** slight transform perf improvement ([#2284](https://github.com/openai/openai-python/issues/2284)) ([746174f](https://github.com/openai/openai-python/commit/746174fae7a018ece5dab54fb0b5a15fcdd18f2f))
17+
* **tests:** improve enum examples ([#2286](https://github.com/openai/openai-python/issues/2286)) ([c9dd81c](https://github.com/openai/openai-python/commit/c9dd81ce0277e8b1f5db5e0a39c4c2bcd9004bcc))
18+
19+
## 1.71.0 (2025-04-07)
20+
21+
Full Changelog: [v1.70.0...v1.71.0](https://github.com/openai/openai-python/compare/v1.70.0...v1.71.0)
22+
23+
### Features
24+
25+
* **api:** manual updates ([bf8b4b6](https://github.com/openai/openai-python/commit/bf8b4b69906bfaea622c9c644270e985d92e2df2))
26+
* **api:** manual updates ([3e37aa3](https://github.com/openai/openai-python/commit/3e37aa3e151d9738625a1daf75d6243d6fdbe8f2))
27+
* **api:** manual updates ([dba9b65](https://github.com/openai/openai-python/commit/dba9b656fa5955b6eba8f6910da836a34de8d59d))
28+
* **api:** manual updates ([f0c463b](https://github.com/openai/openai-python/commit/f0c463b47836666d091b5f616871f1b94646d346))
29+
30+
31+
### Chores
32+
33+
* **deps:** allow websockets v15 ([#2281](https://github.com/openai/openai-python/issues/2281)) ([19c619e](https://github.com/openai/openai-python/commit/19c619ea95839129a86c19d5b60133e1ed9f2746))
34+
* **internal:** only run examples workflow in main repo ([#2282](https://github.com/openai/openai-python/issues/2282)) ([c3e0927](https://github.com/openai/openai-python/commit/c3e0927d3fbbb9f753ba12adfa682a4235ba530a))
35+
* **internal:** remove trailing character ([#2277](https://github.com/openai/openai-python/issues/2277)) ([5a21a2d](https://github.com/openai/openai-python/commit/5a21a2d7994e39bb0c86271eeb807983a9ae874a))
36+
* Remove deprecated/unused remote spec feature ([23f76eb](https://github.com/openai/openai-python/commit/23f76eb0b9ddf12bcb04a6ad3f3ec5e956d2863f))
37+
38+
## 1.70.0 (2025-03-31)
39+
40+
Full Changelog: [v1.69.0...v1.70.0](https://github.com/openai/openai-python/compare/v1.69.0...v1.70.0)
41+
42+
### Features
43+
44+
* **api:** add `get /responses/{response_id}/input_items` endpoint ([4c6a35d](https://github.com/openai/openai-python/commit/4c6a35dec65362a6a738c3387dae57bf8cbfcbb2))
45+
346
## 1.69.0 (2025-03-27)
447

548
Full Changelog: [v1.68.2...v1.69.0](https://github.com/openai/openai-python/compare/v1.68.2...v1.69.0)

api.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,26 @@ Methods:
259259

260260
- <code title="get /fine_tuning/jobs/{fine_tuning_job_id}/checkpoints">client.fine_tuning.jobs.checkpoints.<a href="./src/openai/resources/fine_tuning/jobs/checkpoints.py">list</a>(fine_tuning_job_id, \*\*<a href="src/openai/types/fine_tuning/jobs/checkpoint_list_params.py">params</a>) -> <a href="./src/openai/types/fine_tuning/jobs/fine_tuning_job_checkpoint.py">SyncCursorPage[FineTuningJobCheckpoint]</a></code>
261261

262+
## Checkpoints
263+
264+
### Permissions
265+
266+
Types:
267+
268+
```python
269+
from openai.types.fine_tuning.checkpoints import (
270+
PermissionCreateResponse,
271+
PermissionRetrieveResponse,
272+
PermissionDeleteResponse,
273+
)
274+
```
275+
276+
Methods:
277+
278+
- <code title="post /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions">client.fine_tuning.checkpoints.permissions.<a href="./src/openai/resources/fine_tuning/checkpoints/permissions.py">create</a>(fine_tuned_model_checkpoint, \*\*<a href="src/openai/types/fine_tuning/checkpoints/permission_create_params.py">params</a>) -> <a href="./src/openai/types/fine_tuning/checkpoints/permission_create_response.py">SyncPage[PermissionCreateResponse]</a></code>
279+
- <code title="get /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions">client.fine_tuning.checkpoints.permissions.<a href="./src/openai/resources/fine_tuning/checkpoints/permissions.py">retrieve</a>(fine_tuned_model_checkpoint, \*\*<a href="src/openai/types/fine_tuning/checkpoints/permission_retrieve_params.py">params</a>) -> <a href="./src/openai/types/fine_tuning/checkpoints/permission_retrieve_response.py">PermissionRetrieveResponse</a></code>
280+
- <code title="delete /fine_tuning/checkpoints/{fine_tuned_model_checkpoint}/permissions">client.fine_tuning.checkpoints.permissions.<a href="./src/openai/resources/fine_tuning/checkpoints/permissions.py">delete</a>(fine_tuned_model_checkpoint) -> <a href="./src/openai/types/fine_tuning/checkpoints/permission_delete_response.py">PermissionDeleteResponse</a></code>
281+
262282
# VectorStores
263283

264284
Types:
@@ -706,3 +726,68 @@ from openai.types.responses import ResponseItemList
706726
Methods:
707727

708728
- <code title="get /responses/{response_id}/input_items">client.responses.input_items.<a href="./src/openai/resources/responses/input_items.py">list</a>(response_id, \*\*<a href="src/openai/types/responses/input_item_list_params.py">params</a>) -> <a href="./src/openai/types/responses/response_item.py">SyncCursorPage[ResponseItem]</a></code>
729+
730+
# Evals
731+
732+
Types:
733+
734+
```python
735+
from openai.types import (
736+
EvalCustomDataSourceConfig,
737+
EvalLabelModelGrader,
738+
EvalStoredCompletionsDataSourceConfig,
739+
EvalStringCheckGrader,
740+
EvalTextSimilarityGrader,
741+
EvalCreateResponse,
742+
EvalRetrieveResponse,
743+
EvalUpdateResponse,
744+
EvalListResponse,
745+
EvalDeleteResponse,
746+
)
747+
```
748+
749+
Methods:
750+
751+
- <code title="post /evals">client.evals.<a href="./src/openai/resources/evals/evals.py">create</a>(\*\*<a href="src/openai/types/eval_create_params.py">params</a>) -> <a href="./src/openai/types/eval_create_response.py">EvalCreateResponse</a></code>
752+
- <code title="get /evals/{eval_id}">client.evals.<a href="./src/openai/resources/evals/evals.py">retrieve</a>(eval_id) -> <a href="./src/openai/types/eval_retrieve_response.py">EvalRetrieveResponse</a></code>
753+
- <code title="post /evals/{eval_id}">client.evals.<a href="./src/openai/resources/evals/evals.py">update</a>(eval_id, \*\*<a href="src/openai/types/eval_update_params.py">params</a>) -> <a href="./src/openai/types/eval_update_response.py">EvalUpdateResponse</a></code>
754+
- <code title="get /evals">client.evals.<a href="./src/openai/resources/evals/evals.py">list</a>(\*\*<a href="src/openai/types/eval_list_params.py">params</a>) -> <a href="./src/openai/types/eval_list_response.py">SyncCursorPage[EvalListResponse]</a></code>
755+
- <code title="delete /evals/{eval_id}">client.evals.<a href="./src/openai/resources/evals/evals.py">delete</a>(eval_id) -> <a href="./src/openai/types/eval_delete_response.py">EvalDeleteResponse</a></code>
756+
757+
## Runs
758+
759+
Types:
760+
761+
```python
762+
from openai.types.evals import (
763+
CreateEvalCompletionsRunDataSource,
764+
CreateEvalJSONLRunDataSource,
765+
EvalAPIError,
766+
RunCreateResponse,
767+
RunRetrieveResponse,
768+
RunListResponse,
769+
RunDeleteResponse,
770+
RunCancelResponse,
771+
)
772+
```
773+
774+
Methods:
775+
776+
- <code title="post /evals/{eval_id}/runs">client.evals.runs.<a href="./src/openai/resources/evals/runs/runs.py">create</a>(eval_id, \*\*<a href="src/openai/types/evals/run_create_params.py">params</a>) -> <a href="./src/openai/types/evals/run_create_response.py">RunCreateResponse</a></code>
777+
- <code title="get /evals/{eval_id}/runs/{run_id}">client.evals.runs.<a href="./src/openai/resources/evals/runs/runs.py">retrieve</a>(run_id, \*, eval_id) -> <a href="./src/openai/types/evals/run_retrieve_response.py">RunRetrieveResponse</a></code>
778+
- <code title="get /evals/{eval_id}/runs">client.evals.runs.<a href="./src/openai/resources/evals/runs/runs.py">list</a>(eval_id, \*\*<a href="src/openai/types/evals/run_list_params.py">params</a>) -> <a href="./src/openai/types/evals/run_list_response.py">SyncCursorPage[RunListResponse]</a></code>
779+
- <code title="delete /evals/{eval_id}/runs/{run_id}">client.evals.runs.<a href="./src/openai/resources/evals/runs/runs.py">delete</a>(run_id, \*, eval_id) -> <a href="./src/openai/types/evals/run_delete_response.py">RunDeleteResponse</a></code>
780+
- <code title="post /evals/{eval_id}/runs/{run_id}">client.evals.runs.<a href="./src/openai/resources/evals/runs/runs.py">cancel</a>(run_id, \*, eval_id) -> <a href="./src/openai/types/evals/run_cancel_response.py">RunCancelResponse</a></code>
781+
782+
### OutputItems
783+
784+
Types:
785+
786+
```python
787+
from openai.types.evals.runs import OutputItemRetrieveResponse, OutputItemListResponse
788+
```
789+
790+
Methods:
791+
792+
- <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>
793+
- <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>

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "openai"
3-
version = "1.69.0"
3+
version = "1.72.0"
44
description = "The official Python library for the openai API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
@@ -43,7 +43,7 @@ Repository = "https://github.com/openai/openai-python"
4343
openai = "openai.cli:main"
4444

4545
[project.optional-dependencies]
46-
realtime = ["websockets >= 13, < 15"]
46+
realtime = ["websockets >= 13, < 16"]
4747
datalib = ["numpy >= 1", "pandas >= 1.2.3", "pandas-stubs >= 1.1.0.11"]
4848
voice_helpers = ["sounddevice>=0.5.1", "numpy>=2.0.2"]
4949

requirements-dev.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ urllib3==2.2.1
188188
# via requests
189189
virtualenv==20.24.5
190190
# via nox
191-
websockets==14.2
191+
websockets==15.0.1
192192
# via openai
193193
zipp==3.17.0
194194
# via importlib-metadata

requirements.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,5 +70,5 @@ typing-extensions==4.12.2
7070
# via pydantic-core
7171
tzdata==2024.1
7272
# via pandas
73-
websockets==14.2
73+
websockets==15.0.1
7474
# via openai

src/openai/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,7 @@ def _reset_client() -> None: # type: ignore[reportUnusedFunction]
352352
beta as beta,
353353
chat as chat,
354354
audio as audio,
355+
evals as evals,
355356
files as files,
356357
images as images,
357358
models as models,

src/openai/_client.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
from .resources.beta import beta
3737
from .resources.chat import chat
3838
from .resources.audio import audio
39+
from .resources.evals import evals
3940
from .resources.uploads import uploads
4041
from .resources.responses import responses
4142
from .resources.fine_tuning import fine_tuning
@@ -59,6 +60,7 @@ class OpenAI(SyncAPIClient):
5960
batches: batches.Batches
6061
uploads: uploads.Uploads
6162
responses: responses.Responses
63+
evals: evals.Evals
6264
with_raw_response: OpenAIWithRawResponse
6365
with_streaming_response: OpenAIWithStreamedResponse
6466

@@ -158,6 +160,7 @@ def __init__(
158160
self.batches = batches.Batches(self)
159161
self.uploads = uploads.Uploads(self)
160162
self.responses = responses.Responses(self)
163+
self.evals = evals.Evals(self)
161164
self.with_raw_response = OpenAIWithRawResponse(self)
162165
self.with_streaming_response = OpenAIWithStreamedResponse(self)
163166

@@ -290,6 +293,7 @@ class AsyncOpenAI(AsyncAPIClient):
290293
batches: batches.AsyncBatches
291294
uploads: uploads.AsyncUploads
292295
responses: responses.AsyncResponses
296+
evals: evals.AsyncEvals
293297
with_raw_response: AsyncOpenAIWithRawResponse
294298
with_streaming_response: AsyncOpenAIWithStreamedResponse
295299

@@ -389,6 +393,7 @@ def __init__(
389393
self.batches = batches.AsyncBatches(self)
390394
self.uploads = uploads.AsyncUploads(self)
391395
self.responses = responses.AsyncResponses(self)
396+
self.evals = evals.AsyncEvals(self)
392397
self.with_raw_response = AsyncOpenAIWithRawResponse(self)
393398
self.with_streaming_response = AsyncOpenAIWithStreamedResponse(self)
394399

@@ -522,6 +527,7 @@ def __init__(self, client: OpenAI) -> None:
522527
self.batches = batches.BatchesWithRawResponse(client.batches)
523528
self.uploads = uploads.UploadsWithRawResponse(client.uploads)
524529
self.responses = responses.ResponsesWithRawResponse(client.responses)
530+
self.evals = evals.EvalsWithRawResponse(client.evals)
525531

526532

527533
class AsyncOpenAIWithRawResponse:
@@ -540,6 +546,7 @@ def __init__(self, client: AsyncOpenAI) -> None:
540546
self.batches = batches.AsyncBatchesWithRawResponse(client.batches)
541547
self.uploads = uploads.AsyncUploadsWithRawResponse(client.uploads)
542548
self.responses = responses.AsyncResponsesWithRawResponse(client.responses)
549+
self.evals = evals.AsyncEvalsWithRawResponse(client.evals)
543550

544551

545552
class OpenAIWithStreamedResponse:
@@ -558,6 +565,7 @@ def __init__(self, client: OpenAI) -> None:
558565
self.batches = batches.BatchesWithStreamingResponse(client.batches)
559566
self.uploads = uploads.UploadsWithStreamingResponse(client.uploads)
560567
self.responses = responses.ResponsesWithStreamingResponse(client.responses)
568+
self.evals = evals.EvalsWithStreamingResponse(client.evals)
561569

562570

563571
class AsyncOpenAIWithStreamedResponse:
@@ -576,6 +584,7 @@ def __init__(self, client: AsyncOpenAI) -> None:
576584
self.batches = batches.AsyncBatchesWithStreamingResponse(client.batches)
577585
self.uploads = uploads.AsyncUploadsWithStreamingResponse(client.uploads)
578586
self.responses = responses.AsyncResponsesWithStreamingResponse(client.responses)
587+
self.evals = evals.AsyncEvalsWithStreamingResponse(client.evals)
579588

580589

581590
Client = OpenAI

0 commit comments

Comments
 (0)