Skip to content

Commit 9bab5da

Browse files
chore(api): docs and spec refactoring
1 parent 0b1f6a2 commit 9bab5da

21 files changed

+94
-60
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 118
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-94b1e3cb0bdc616ff0c2f267c33dadd95f133b1f64e647aab6c64afb292b2793.yml
3-
openapi_spec_hash: 2395319ac9befd59b6536ae7f9564a05
4-
config_hash: 930dac3aa861344867e4ac84f037b5df
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-d30ff992a48873c1466c49f3c01f2ec8933faebff23424748f8d056065b1bcef.yml
3+
openapi_spec_hash: e933ec43b46f45c348adb78840e5808d
4+
config_hash: bf45940f0a7805b4ec2017eecdd36893

src/openai/resources/chat/completions/completions.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,10 +1300,12 @@ def list(
13001300
13011301
limit: Number of Chat Completions to retrieve.
13021302
1303-
metadata:
1304-
A list of metadata keys to filter the Chat Completions by. Example:
1303+
metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
1304+
for storing additional information about the object in a structured format, and
1305+
querying for objects via API or the dashboard.
13051306
1306-
`metadata[key1]=value1&metadata[key2]=value2`
1307+
Keys are strings with a maximum length of 64 characters. Values are strings with
1308+
a maximum length of 512 characters.
13071309
13081310
model: The model used to generate the Chat Completions.
13091311
@@ -2736,10 +2738,12 @@ def list(
27362738
27372739
limit: Number of Chat Completions to retrieve.
27382740
2739-
metadata:
2740-
A list of metadata keys to filter the Chat Completions by. Example:
2741+
metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
2742+
for storing additional information about the object in a structured format, and
2743+
querying for objects via API or the dashboard.
27412744
2742-
`metadata[key1]=value1&metadata[key2]=value2`
2745+
Keys are strings with a maximum length of 64 characters. Values are strings with
2746+
a maximum length of 512 characters.
27432747
27442748
model: The model used to generate the Chat Completions.
27452749

src/openai/resources/conversations/conversations.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,12 @@ def create(
7373
items: Initial items to include in the conversation context. You may add up to 20 items
7474
at a time.
7575
76-
metadata: Set of 16 key-value pairs that can be attached to an object. Useful for storing
77-
additional information about the object in a structured format.
76+
metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
77+
for storing additional information about the object in a structured format, and
78+
querying for objects via API or the dashboard.
79+
80+
Keys are strings with a maximum length of 64 characters. Values are strings with
81+
a maximum length of 512 characters.
7882
7983
extra_headers: Send extra headers
8084
@@ -250,8 +254,12 @@ async def create(
250254
items: Initial items to include in the conversation context. You may add up to 20 items
251255
at a time.
252256
253-
metadata: Set of 16 key-value pairs that can be attached to an object. Useful for storing
254-
additional information about the object in a structured format.
257+
metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful
258+
for storing additional information about the object in a structured format, and
259+
querying for objects via API or the dashboard.
260+
261+
Keys are strings with a maximum length of 64 characters. Values are strings with
262+
a maximum length of 512 characters.
255263
256264
extra_headers: Send extra headers
257265

src/openai/types/audio/transcription_create_params.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ class TranscriptionCreateParamsBase(TypedDict, total=False):
4343
"""
4444

4545
include: List[TranscriptionInclude]
46-
"""Additional information to include in the transcription response.
47-
48-
`logprobs` will return the log probabilities of the tokens in the response to
49-
understand the model's confidence in the transcription. `logprobs` only works
50-
with response_format set to `json` and only with the models `gpt-4o-transcribe`
51-
and `gpt-4o-mini-transcribe`.
46+
"""
47+
Additional information to include in the transcription response. `logprobs` will
48+
return the log probabilities of the tokens in the response to understand the
49+
model's confidence in the transcription. `logprobs` only works with
50+
response_format set to `json` and only with the models `gpt-4o-transcribe` and
51+
`gpt-4o-mini-transcribe`.
5252
"""
5353

5454
language: str

src/openai/types/chat/chat_completion_assistant_message_param.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ class ChatCompletionAssistantMessageParam(TypedDict, total=False):
3838
"""The role of the messages author, in this case `assistant`."""
3939

4040
audio: Optional[Audio]
41-
"""Data about a previous audio response from the model.
42-
41+
"""
42+
Data about a previous audio response from the model.
4343
[Learn more](https://platform.openai.com/docs/guides/audio).
4444
"""
4545

src/openai/types/chat/completion_list_params.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,13 @@ class CompletionListParams(TypedDict, total=False):
1818
"""Number of Chat Completions to retrieve."""
1919

2020
metadata: Optional[Metadata]
21-
"""A list of metadata keys to filter the Chat Completions by. Example:
21+
"""Set of 16 key-value pairs that can be attached to an object.
2222
23-
`metadata[key1]=value1&metadata[key2]=value2`
23+
This can be useful for storing additional information about the object in a
24+
structured format, and querying for objects via API or the dashboard.
25+
26+
Keys are strings with a maximum length of 64 characters. Values are strings with
27+
a maximum length of 512 characters.
2428
"""
2529

2630
model: str

src/openai/types/conversations/conversation_create_params.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ class ConversationCreateParams(TypedDict, total=False):
2121
metadata: Optional[Metadata]
2222
"""Set of 16 key-value pairs that can be attached to an object.
2323
24-
Useful for storing additional information about the object in a structured
25-
format.
24+
This can be useful for storing additional information about the object in a
25+
structured format, and querying for objects via API or the dashboard.
26+
27+
Keys are strings with a maximum length of 64 characters. Values are strings with
28+
a maximum length of 512 characters.
2629
"""

src/openai/types/evals/run_cancel_response.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,12 @@ class DataSourceResponsesSourceResponses(BaseModel):
100100
"""
101101

102102
reasoning_effort: Optional[ReasoningEffort] = None
103-
"""Optional reasoning effort parameter.
104-
105-
This is a query parameter used to select responses.
103+
"""
104+
Constrains effort on reasoning for
105+
[reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
106+
supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
107+
effort can result in faster responses and fewer tokens used on reasoning in a
108+
response.
106109
"""
107110

108111
temperature: Optional[float] = None

src/openai/types/evals/run_create_params.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,12 @@ class DataSourceCreateEvalResponsesRunDataSourceSourceResponses(TypedDict, total
113113
"""
114114

115115
reasoning_effort: Optional[ReasoningEffort]
116-
"""Optional reasoning effort parameter.
117-
118-
This is a query parameter used to select responses.
116+
"""
117+
Constrains effort on reasoning for
118+
[reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
119+
supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
120+
effort can result in faster responses and fewer tokens used on reasoning in a
121+
response.
119122
"""
120123

121124
temperature: Optional[float]

src/openai/types/evals/run_create_response.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,12 @@ class DataSourceResponsesSourceResponses(BaseModel):
100100
"""
101101

102102
reasoning_effort: Optional[ReasoningEffort] = None
103-
"""Optional reasoning effort parameter.
104-
105-
This is a query parameter used to select responses.
103+
"""
104+
Constrains effort on reasoning for
105+
[reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
106+
supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning
107+
effort can result in faster responses and fewer tokens used on reasoning in a
108+
response.
106109
"""
107110

108111
temperature: Optional[float] = None

0 commit comments

Comments
 (0)