diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 32e0d8892c..3b81c9b87e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.107.2" + ".": "1.107.3" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index e389718967..905a02c44a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 118 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-94b1e3cb0bdc616ff0c2f267c33dadd95f133b1f64e647aab6c64afb292b2793.yml -openapi_spec_hash: 2395319ac9befd59b6536ae7f9564a05 -config_hash: 930dac3aa861344867e4ac84f037b5df +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-d30ff992a48873c1466c49f3c01f2ec8933faebff23424748f8d056065b1bcef.yml +openapi_spec_hash: e933ec43b46f45c348adb78840e5808d +config_hash: bf45940f0a7805b4ec2017eecdd36893 diff --git a/CHANGELOG.md b/CHANGELOG.md index 31ccac5195..b9314bd48a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 1.107.3 (2025-09-15) + +Full Changelog: [v1.107.2...v1.107.3](https://github.com/openai/openai-python/compare/v1.107.2...v1.107.3) + +### Chores + +* **api:** docs and spec refactoring ([9bab5da](https://github.com/openai/openai-python/commit/9bab5da1802c3575c58e73ed1470dd5fa61fd1d2)) +* **tests:** simplify `get_platform` test ([0b1f6a2](https://github.com/openai/openai-python/commit/0b1f6a28d5a59e10873264e976d2e332903eef29)) + ## 1.107.2 (2025-09-12) Full Changelog: [v1.107.1...v1.107.2](https://github.com/openai/openai-python/compare/v1.107.1...v1.107.2) diff --git a/pyproject.toml b/pyproject.toml index 7cb1ef4f76..190542e6dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openai" -version = "1.107.2" +version = "1.107.3" description = "The official Python library for the openai API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/openai/_version.py b/src/openai/_version.py index 70f9958885..aa7660d137 100644 --- a/src/openai/_version.py +++ b/src/openai/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "openai" -__version__ = "1.107.2" # x-release-please-version +__version__ = "1.107.3" # x-release-please-version diff --git a/src/openai/resources/chat/completions/completions.py b/src/openai/resources/chat/completions/completions.py index 168cf04dbc..f29792a207 100644 --- a/src/openai/resources/chat/completions/completions.py +++ b/src/openai/resources/chat/completions/completions.py @@ -1300,10 +1300,12 @@ def list( limit: Number of Chat Completions to retrieve. - metadata: - A list of metadata keys to filter the Chat Completions by. Example: + metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful + for storing additional information about the object in a structured format, and + querying for objects via API or the dashboard. - `metadata[key1]=value1&metadata[key2]=value2` + Keys are strings with a maximum length of 64 characters. Values are strings with + a maximum length of 512 characters. model: The model used to generate the Chat Completions. @@ -2736,10 +2738,12 @@ def list( limit: Number of Chat Completions to retrieve. - metadata: - A list of metadata keys to filter the Chat Completions by. Example: + metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful + for storing additional information about the object in a structured format, and + querying for objects via API or the dashboard. - `metadata[key1]=value1&metadata[key2]=value2` + Keys are strings with a maximum length of 64 characters. Values are strings with + a maximum length of 512 characters. model: The model used to generate the Chat Completions. diff --git a/src/openai/resources/conversations/conversations.py b/src/openai/resources/conversations/conversations.py index 802620e6ad..c0239d402c 100644 --- a/src/openai/resources/conversations/conversations.py +++ b/src/openai/resources/conversations/conversations.py @@ -73,8 +73,12 @@ def create( items: Initial items to include in the conversation context. You may add up to 20 items at a time. - metadata: Set of 16 key-value pairs that can be attached to an object. Useful for storing - additional information about the object in a structured format. + metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful + for storing additional information about the object in a structured format, and + querying for objects via API or the dashboard. + + Keys are strings with a maximum length of 64 characters. Values are strings with + a maximum length of 512 characters. extra_headers: Send extra headers @@ -250,8 +254,12 @@ async def create( items: Initial items to include in the conversation context. You may add up to 20 items at a time. - metadata: Set of 16 key-value pairs that can be attached to an object. Useful for storing - additional information about the object in a structured format. + metadata: Set of 16 key-value pairs that can be attached to an object. This can be useful + for storing additional information about the object in a structured format, and + querying for objects via API or the dashboard. + + Keys are strings with a maximum length of 64 characters. Values are strings with + a maximum length of 512 characters. extra_headers: Send extra headers diff --git a/src/openai/types/audio/transcription_create_params.py b/src/openai/types/audio/transcription_create_params.py index 8271b054ab..f7abcced87 100644 --- a/src/openai/types/audio/transcription_create_params.py +++ b/src/openai/types/audio/transcription_create_params.py @@ -43,12 +43,12 @@ class TranscriptionCreateParamsBase(TypedDict, total=False): """ include: List[TranscriptionInclude] - """Additional information to include in the transcription response. - - `logprobs` will return the log probabilities of the tokens in the response to - understand the model's confidence in the transcription. `logprobs` only works - with response_format set to `json` and only with the models `gpt-4o-transcribe` - and `gpt-4o-mini-transcribe`. + """ + Additional information to include in the transcription response. `logprobs` will + return the log probabilities of the tokens in the response to understand the + model's confidence in the transcription. `logprobs` only works with + response_format set to `json` and only with the models `gpt-4o-transcribe` and + `gpt-4o-mini-transcribe`. """ language: str diff --git a/src/openai/types/chat/chat_completion_assistant_message_param.py b/src/openai/types/chat/chat_completion_assistant_message_param.py index 212d933e9b..1a08a959db 100644 --- a/src/openai/types/chat/chat_completion_assistant_message_param.py +++ b/src/openai/types/chat/chat_completion_assistant_message_param.py @@ -38,8 +38,8 @@ class ChatCompletionAssistantMessageParam(TypedDict, total=False): """The role of the messages author, in this case `assistant`.""" audio: Optional[Audio] - """Data about a previous audio response from the model. - + """ + Data about a previous audio response from the model. [Learn more](https://platform.openai.com/docs/guides/audio). """ diff --git a/src/openai/types/chat/completion_list_params.py b/src/openai/types/chat/completion_list_params.py index d93da834a3..32bd3f5c0a 100644 --- a/src/openai/types/chat/completion_list_params.py +++ b/src/openai/types/chat/completion_list_params.py @@ -18,9 +18,13 @@ class CompletionListParams(TypedDict, total=False): """Number of Chat Completions to retrieve.""" metadata: Optional[Metadata] - """A list of metadata keys to filter the Chat Completions by. Example: + """Set of 16 key-value pairs that can be attached to an object. - `metadata[key1]=value1&metadata[key2]=value2` + This can be useful for storing additional information about the object in a + structured format, and querying for objects via API or the dashboard. + + Keys are strings with a maximum length of 64 characters. Values are strings with + a maximum length of 512 characters. """ model: str diff --git a/src/openai/types/conversations/conversation_create_params.py b/src/openai/types/conversations/conversation_create_params.py index 7ad3f8ae2d..0d84f503bd 100644 --- a/src/openai/types/conversations/conversation_create_params.py +++ b/src/openai/types/conversations/conversation_create_params.py @@ -21,6 +21,9 @@ class ConversationCreateParams(TypedDict, total=False): metadata: Optional[Metadata] """Set of 16 key-value pairs that can be attached to an object. - Useful for storing additional information about the object in a structured - format. + This can be useful for storing additional information about the object in a + structured format, and querying for objects via API or the dashboard. + + Keys are strings with a maximum length of 64 characters. Values are strings with + a maximum length of 512 characters. """ diff --git a/src/openai/types/evals/run_cancel_response.py b/src/openai/types/evals/run_cancel_response.py index 44f9cfc453..8f43494e68 100644 --- a/src/openai/types/evals/run_cancel_response.py +++ b/src/openai/types/evals/run_cancel_response.py @@ -100,9 +100,12 @@ class DataSourceResponsesSourceResponses(BaseModel): """ reasoning_effort: Optional[ReasoningEffort] = None - """Optional reasoning effort parameter. - - This is a query parameter used to select responses. + """ + Constrains effort on reasoning for + [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently + supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning + effort can result in faster responses and fewer tokens used on reasoning in a + response. """ temperature: Optional[float] = None diff --git a/src/openai/types/evals/run_create_params.py b/src/openai/types/evals/run_create_params.py index ef9541ff0a..35813c8901 100644 --- a/src/openai/types/evals/run_create_params.py +++ b/src/openai/types/evals/run_create_params.py @@ -113,9 +113,12 @@ class DataSourceCreateEvalResponsesRunDataSourceSourceResponses(TypedDict, total """ reasoning_effort: Optional[ReasoningEffort] - """Optional reasoning effort parameter. - - This is a query parameter used to select responses. + """ + Constrains effort on reasoning for + [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently + supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning + effort can result in faster responses and fewer tokens used on reasoning in a + response. """ temperature: Optional[float] diff --git a/src/openai/types/evals/run_create_response.py b/src/openai/types/evals/run_create_response.py index 70641d6db8..c842a5ad2f 100644 --- a/src/openai/types/evals/run_create_response.py +++ b/src/openai/types/evals/run_create_response.py @@ -100,9 +100,12 @@ class DataSourceResponsesSourceResponses(BaseModel): """ reasoning_effort: Optional[ReasoningEffort] = None - """Optional reasoning effort parameter. - - This is a query parameter used to select responses. + """ + Constrains effort on reasoning for + [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently + supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning + effort can result in faster responses and fewer tokens used on reasoning in a + response. """ temperature: Optional[float] = None diff --git a/src/openai/types/evals/run_list_response.py b/src/openai/types/evals/run_list_response.py index e31d570a84..5a5c2efbb3 100644 --- a/src/openai/types/evals/run_list_response.py +++ b/src/openai/types/evals/run_list_response.py @@ -100,9 +100,12 @@ class DataSourceResponsesSourceResponses(BaseModel): """ reasoning_effort: Optional[ReasoningEffort] = None - """Optional reasoning effort parameter. - - This is a query parameter used to select responses. + """ + Constrains effort on reasoning for + [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently + supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning + effort can result in faster responses and fewer tokens used on reasoning in a + response. """ temperature: Optional[float] = None diff --git a/src/openai/types/evals/run_retrieve_response.py b/src/openai/types/evals/run_retrieve_response.py index 62213d3edd..f341296875 100644 --- a/src/openai/types/evals/run_retrieve_response.py +++ b/src/openai/types/evals/run_retrieve_response.py @@ -100,9 +100,12 @@ class DataSourceResponsesSourceResponses(BaseModel): """ reasoning_effort: Optional[ReasoningEffort] = None - """Optional reasoning effort parameter. - - This is a query parameter used to select responses. + """ + Constrains effort on reasoning for + [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently + supported values are `minimal`, `low`, `medium`, and `high`. Reducing reasoning + effort can result in faster responses and fewer tokens used on reasoning in a + response. """ temperature: Optional[float] = None diff --git a/src/openai/types/realtime/realtime_response_create_params.py b/src/openai/types/realtime/realtime_response_create_params.py index 4dfd1fd386..e8486220bf 100644 --- a/src/openai/types/realtime/realtime_response_create_params.py +++ b/src/openai/types/realtime/realtime_response_create_params.py @@ -83,8 +83,8 @@ class RealtimeResponseCreateParams(BaseModel): """ prompt: Optional[ResponsePrompt] = None - """Reference to a prompt template and its variables. - + """ + Reference to a prompt template and its variables. [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). """ diff --git a/src/openai/types/realtime/realtime_response_create_params_param.py b/src/openai/types/realtime/realtime_response_create_params_param.py index eceffcccb7..116384bd82 100644 --- a/src/openai/types/realtime/realtime_response_create_params_param.py +++ b/src/openai/types/realtime/realtime_response_create_params_param.py @@ -84,8 +84,8 @@ class RealtimeResponseCreateParamsParam(TypedDict, total=False): """ prompt: Optional[ResponsePromptParam] - """Reference to a prompt template and its variables. - + """ + Reference to a prompt template and its variables. [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). """ diff --git a/src/openai/types/realtime/realtime_session_create_request.py b/src/openai/types/realtime/realtime_session_create_request.py index 578bc43821..755dbe8638 100644 --- a/src/openai/types/realtime/realtime_session_create_request.py +++ b/src/openai/types/realtime/realtime_session_create_request.py @@ -76,8 +76,8 @@ class RealtimeSessionCreateRequest(BaseModel): """ prompt: Optional[ResponsePrompt] = None - """Reference to a prompt template and its variables. - + """ + Reference to a prompt template and its variables. [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). """ diff --git a/src/openai/types/realtime/realtime_session_create_request_param.py b/src/openai/types/realtime/realtime_session_create_request_param.py index 5f7819fa61..cd4ef71ba2 100644 --- a/src/openai/types/realtime/realtime_session_create_request_param.py +++ b/src/openai/types/realtime/realtime_session_create_request_param.py @@ -76,8 +76,8 @@ class RealtimeSessionCreateRequestParam(TypedDict, total=False): """ prompt: Optional[ResponsePromptParam] - """Reference to a prompt template and its variables. - + """ + Reference to a prompt template and its variables. [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). """ diff --git a/src/openai/types/realtime/realtime_session_create_response.py b/src/openai/types/realtime/realtime_session_create_response.py index 8d7bfd6d8e..2d6912d072 100644 --- a/src/openai/types/realtime/realtime_session_create_response.py +++ b/src/openai/types/realtime/realtime_session_create_response.py @@ -429,8 +429,8 @@ class RealtimeSessionCreateResponse(BaseModel): """ prompt: Optional[ResponsePrompt] = None - """Reference to a prompt template and its variables. - + """ + Reference to a prompt template and its variables. [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). """ diff --git a/src/openai/types/responses/response.py b/src/openai/types/responses/response.py index 423b6f20f1..a1133a41f5 100644 --- a/src/openai/types/responses/response.py +++ b/src/openai/types/responses/response.py @@ -180,8 +180,8 @@ class Response(BaseModel): """ prompt: Optional[ResponsePrompt] = None - """Reference to a prompt template and its variables. - + """ + Reference to a prompt template and its variables. [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). """ diff --git a/src/openai/types/responses/response_code_interpreter_tool_call.py b/src/openai/types/responses/response_code_interpreter_tool_call.py index 257937118b..ed720ecd42 100644 --- a/src/openai/types/responses/response_code_interpreter_tool_call.py +++ b/src/openai/types/responses/response_code_interpreter_tool_call.py @@ -39,9 +39,9 @@ class ResponseCodeInterpreterToolCall(BaseModel): """The ID of the container used to run the code.""" outputs: Optional[List[Output]] = None - """The outputs generated by the code interpreter, such as logs or images. - - Can be null if no outputs are available. + """ + The outputs generated by the code interpreter, such as logs or images. Can be + null if no outputs are available. """ status: Literal["in_progress", "completed", "incomplete", "interpreting", "failed"] diff --git a/src/openai/types/responses/response_code_interpreter_tool_call_param.py b/src/openai/types/responses/response_code_interpreter_tool_call_param.py index 435091001f..78b90ca87e 100644 --- a/src/openai/types/responses/response_code_interpreter_tool_call_param.py +++ b/src/openai/types/responses/response_code_interpreter_tool_call_param.py @@ -38,9 +38,9 @@ class ResponseCodeInterpreterToolCallParam(TypedDict, total=False): """The ID of the container used to run the code.""" outputs: Required[Optional[Iterable[Output]]] - """The outputs generated by the code interpreter, such as logs or images. - - Can be null if no outputs are available. + """ + The outputs generated by the code interpreter, such as logs or images. Can be + null if no outputs are available. """ status: Required[Literal["in_progress", "completed", "incomplete", "interpreting", "failed"]] diff --git a/src/openai/types/responses/response_create_params.py b/src/openai/types/responses/response_create_params.py index af0d5e7483..ba5c45ffee 100644 --- a/src/openai/types/responses/response_create_params.py +++ b/src/openai/types/responses/response_create_params.py @@ -134,8 +134,8 @@ class ResponseCreateParamsBase(TypedDict, total=False): """ prompt: Optional[ResponsePromptParam] - """Reference to a prompt template and its variables. - + """ + Reference to a prompt template and its variables. [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts). """