Skip to content

Commit 598e7a2

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
chore(internal): updates (#1624)
1 parent 43e10c0 commit 598e7a2

File tree

5 files changed

+38
-4
lines changed

5 files changed

+38
-4
lines changed

.stats.yml

+1-1
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-4097c2f86beb3f3bb021775cd1dfa240e960caf842aeefc2e08da4dc0851ea79.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-97797a9363b9960b5f2fbdc84426a2b91e75533ecd409fe99e37c231180a4339.yml

pyproject.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ unfixable = [
202202
"T201",
203203
"T203",
204204
]
205-
ignore-init-module-imports = true
206205

207206
[tool.ruff.lint.flake8-tidy-imports.banned-api]
208207
"functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead"
@@ -214,7 +213,7 @@ combine-as-imports = true
214213
extra-standard-library = ["typing_extensions"]
215214
known-first-party = ["openai", "tests"]
216215

217-
[tool.ruff.per-file-ignores]
216+
[tool.ruff.lint.per-file-ignores]
218217
"bin/**.py" = ["T201", "T203"]
219218
"scripts/**.py" = ["T201", "T203"]
220219
"tests/**.py" = ["T201", "T203"]

src/openai/resources/chat/completions.py

+30
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ def create(
149149
[GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
150150
all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.
151151
152+
Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
153+
Outputs which guarantees the model will match your supplied JSON schema. Learn
154+
more in the
155+
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
156+
152157
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
153158
message the model generates is valid JSON.
154159
@@ -347,6 +352,11 @@ def create(
347352
[GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
348353
all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.
349354
355+
Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
356+
Outputs which guarantees the model will match your supplied JSON schema. Learn
357+
more in the
358+
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
359+
350360
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
351361
message the model generates is valid JSON.
352362
@@ -538,6 +548,11 @@ def create(
538548
[GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
539549
all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.
540550
551+
Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
552+
Outputs which guarantees the model will match your supplied JSON schema. Learn
553+
more in the
554+
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
555+
541556
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
542557
message the model generates is valid JSON.
543558
@@ -805,6 +820,11 @@ async def create(
805820
[GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
806821
all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.
807822
823+
Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
824+
Outputs which guarantees the model will match your supplied JSON schema. Learn
825+
more in the
826+
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
827+
808828
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
809829
message the model generates is valid JSON.
810830
@@ -1003,6 +1023,11 @@ async def create(
10031023
[GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
10041024
all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.
10051025
1026+
Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
1027+
Outputs which guarantees the model will match your supplied JSON schema. Learn
1028+
more in the
1029+
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
1030+
10061031
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
10071032
message the model generates is valid JSON.
10081033
@@ -1194,6 +1219,11 @@ async def create(
11941219
[GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
11951220
all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.
11961221
1222+
Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
1223+
Outputs which guarantees the model will match your supplied JSON schema. Learn
1224+
more in the
1225+
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
1226+
11971227
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
11981228
message the model generates is valid JSON.
11991229

src/openai/types/chat/completion_create_params.py

+5
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@ class CompletionCreateParamsBase(TypedDict, total=False):
126126
[GPT-4 Turbo](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo) and
127127
all GPT-3.5 Turbo models newer than `gpt-3.5-turbo-1106`.
128128
129+
Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured
130+
Outputs which guarantees the model will match your supplied JSON schema. Learn
131+
more in the
132+
[Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
133+
129134
Setting to `{ "type": "json_object" }` enables JSON mode, which guarantees the
130135
message the model generates is valid JSON.
131136

src/openai/types/chat_model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
ChatModel: TypeAlias = Literal[
88
"gpt-4o",
9-
"gpt-4o-2024-08-06",
109
"gpt-4o-2024-05-13",
10+
"gpt-4o-2024-08-06",
1111
"gpt-4o-mini",
1212
"gpt-4o-mini-2024-07-18",
1313
"gpt-4-turbo",

0 commit comments

Comments
 (0)