Skip to content

Commit 2bfc969

Browse files
feat(api): add o1 models (#1708)
See https://platform.openai.com/docs/guides/reasoning for details.
1 parent a64f5d4 commit 2bfc969

File tree

19 files changed

+239
-155
lines changed

19 files changed

+239
-155
lines changed

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 68
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-85a85e0c08de456441431c0ae4e9c078cc8f9748c29430b9a9058340db6389ee.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-501122aa32adaa2abb3d4487880ab9cdf2141addce2e6c3d1bd9bb6b44c318a8.yml

src/openai/resources/beta/assistants.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,11 +100,11 @@ def create(
100100
and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
101101
102102
Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
103-
Outputs which guarantees the model will match your supplied JSON schema. Learn
104-
more in the
103+
Outputs which ensures the model will match your supplied JSON schema. Learn more
104+
in the
105105
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
106106
107-
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
107+
Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
108108
message the model generates is valid JSON.
109109
110110
**Important:** when using JSON mode, you **must** also instruct the model to
@@ -250,11 +250,11 @@ def update(
250250
and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
251251
252252
Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
253-
Outputs which guarantees the model will match your supplied JSON schema. Learn
254-
more in the
253+
Outputs which ensures the model will match your supplied JSON schema. Learn more
254+
in the
255255
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
256256
257-
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
257+
Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
258258
message the model generates is valid JSON.
259259
260260
**Important:** when using JSON mode, you **must** also instruct the model to
@@ -486,11 +486,11 @@ async def create(
486486
and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
487487
488488
Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
489-
Outputs which guarantees the model will match your supplied JSON schema. Learn
490-
more in the
489+
Outputs which ensures the model will match your supplied JSON schema. Learn more
490+
in the
491491
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
492492
493-
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
493+
Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
494494
message the model generates is valid JSON.
495495
496496
**Important:** when using JSON mode, you **must** also instruct the model to
@@ -636,11 +636,11 @@ async def update(
636636
and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
637637
638638
Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
639-
Outputs which guarantees the model will match your supplied JSON schema. Learn
640-
more in the
639+
Outputs which ensures the model will match your supplied JSON schema. Learn more
640+
in the
641641
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
642642
643-
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
643+
Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
644644
message the model generates is valid JSON.
645645
646646
**Important:** when using JSON mode, you **must** also instruct the model to

src/openai/resources/beta/threads/runs/runs.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,11 @@ def create(
156156
and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
157157
158158
Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
159-
Outputs which guarantees the model will match your supplied JSON schema. Learn
160-
more in the
159+
Outputs which ensures the model will match your supplied JSON schema. Learn more
160+
in the
161161
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
162162
163-
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
163+
Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
164164
message the model generates is valid JSON.
165165
166166
**Important:** when using JSON mode, you **must** also instruct the model to
@@ -300,11 +300,11 @@ def create(
300300
and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
301301
302302
Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
303-
Outputs which guarantees the model will match your supplied JSON schema. Learn
304-
more in the
303+
Outputs which ensures the model will match your supplied JSON schema. Learn more
304+
in the
305305
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
306306
307-
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
307+
Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
308308
message the model generates is valid JSON.
309309
310310
**Important:** when using JSON mode, you **must** also instruct the model to
@@ -440,11 +440,11 @@ def create(
440440
and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
441441
442442
Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
443-
Outputs which guarantees the model will match your supplied JSON schema. Learn
444-
more in the
443+
Outputs which ensures the model will match your supplied JSON schema. Learn more
444+
in the
445445
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
446446
447-
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
447+
Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
448448
message the model generates is valid JSON.
449449
450450
**Important:** when using JSON mode, you **must** also instruct the model to
@@ -1004,11 +1004,11 @@ async def create(
10041004
and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
10051005
10061006
Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
1007-
Outputs which guarantees the model will match your supplied JSON schema. Learn
1008-
more in the
1007+
Outputs which ensures the model will match your supplied JSON schema. Learn more
1008+
in the
10091009
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
10101010
1011-
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
1011+
Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
10121012
message the model generates is valid JSON.
10131013
10141014
**Important:** when using JSON mode, you **must** also instruct the model to
@@ -1148,11 +1148,11 @@ async def create(
11481148
and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
11491149
11501150
Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
1151-
Outputs which guarantees the model will match your supplied JSON schema. Learn
1152-
more in the
1151+
Outputs which ensures the model will match your supplied JSON schema. Learn more
1152+
in the
11531153
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
11541154
1155-
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
1155+
Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
11561156
message the model generates is valid JSON.
11571157
11581158
**Important:** when using JSON mode, you **must** also instruct the model to
@@ -1288,11 +1288,11 @@ async def create(
12881288
and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
12891289
12901290
Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
1291-
Outputs which guarantees the model will match your supplied JSON schema. Learn
1292-
more in the
1291+
Outputs which ensures the model will match your supplied JSON schema. Learn more
1292+
in the
12931293
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
12941294
1295-
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
1295+
Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
12961296
message the model generates is valid JSON.
12971297
12981298
**Important:** when using JSON mode, you **must** also instruct the model to

src/openai/resources/beta/threads/threads.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -326,11 +326,11 @@ def create_and_run(
326326
and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
327327
328328
Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
329-
Outputs which guarantees the model will match your supplied JSON schema. Learn
330-
more in the
329+
Outputs which ensures the model will match your supplied JSON schema. Learn more
330+
in the
331331
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
332332
333-
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
333+
Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
334334
message the model generates is valid JSON.
335335
336336
**Important:** when using JSON mode, you **must** also instruct the model to
@@ -460,11 +460,11 @@ def create_and_run(
460460
and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
461461
462462
Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
463-
Outputs which guarantees the model will match your supplied JSON schema. Learn
464-
more in the
463+
Outputs which ensures the model will match your supplied JSON schema. Learn more
464+
in the
465465
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
466466
467-
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
467+
Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
468468
message the model generates is valid JSON.
469469
470470
**Important:** when using JSON mode, you **must** also instruct the model to
@@ -590,11 +590,11 @@ def create_and_run(
590590
and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
591591
592592
Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
593-
Outputs which guarantees the model will match your supplied JSON schema. Learn
594-
more in the
593+
Outputs which ensures the model will match your supplied JSON schema. Learn more
594+
in the
595595
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
596596
597-
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
597+
Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
598598
message the model generates is valid JSON.
599599
600600
**Important:** when using JSON mode, you **must** also instruct the model to
@@ -980,11 +980,11 @@ async def create_and_run(
980980
and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
981981
982982
Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
983-
Outputs which guarantees the model will match your supplied JSON schema. Learn
984-
more in the
983+
Outputs which ensures the model will match your supplied JSON schema. Learn more
984+
in the
985985
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
986986
987-
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
987+
Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
988988
message the model generates is valid JSON.
989989
990990
**Important:** when using JSON mode, you **must** also instruct the model to
@@ -1114,11 +1114,11 @@ async def create_and_run(
11141114
and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
11151115
11161116
Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
1117-
Outputs which guarantees the model will match your supplied JSON schema. Learn
1118-
more in the
1117+
Outputs which ensures the model will match your supplied JSON schema. Learn more
1118+
in the
11191119
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
11201120
1121-
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
1121+
Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
11221122
message the model generates is valid JSON.
11231123
11241124
**Important:** when using JSON mode, you **must** also instruct the model to
@@ -1244,11 +1244,11 @@ async def create_and_run(
12441244
and all GPT-3.5 Turbo models since `gpt-3.5-turbo-1106`.
12451245
12461246
Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
1247-
Outputs which guarantees the model will match your supplied JSON schema. Learn
1248-
more in the
1247+
Outputs which ensures the model will match your supplied JSON schema. Learn more
1248+
in the
12491249
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
12501250
1251-
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
1251+
Setting to `{ "type": "json_object" }` enables JSON mode, which ensures the
12521252
message the model generates is valid JSON.
12531253
12541254
**Important:** when using JSON mode, you **must** also instruct the model to

0 commit comments

Comments
 (0)