From 44fb382698872d98d5f72c880b47846c7b594f4f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 20:08:36 +0000 Subject: [PATCH 1/7] feat(api): remove prompt_cache_key param from responses, phase field from message types --- .stats.yml | 4 ++-- src/openai/resources/responses/responses.py | 8 -------- src/openai/types/responses/easy_input_message.py | 9 --------- .../types/responses/easy_input_message_param.py | 11 +---------- src/openai/types/responses/response_compact_params.py | 3 --- src/openai/types/responses/response_output_message.py | 11 +---------- .../types/responses/response_output_message_param.py | 11 +---------- tests/api_resources/conversations/test_items.py | 2 -- tests/api_resources/test_conversations.py | 2 -- tests/api_resources/test_responses.py | 2 -- 10 files changed, 5 insertions(+), 58 deletions(-) diff --git a/.stats.yml b/.stats.yml index 476a5b7658..6c9e230e9b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 148 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-6bfe886b5ded0fe3bf37ca672698814e16e0836a093ceef65dac37ae44d1ad6b.yml -openapi_spec_hash: 6b1344a59044318e824c8d1af96033c7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-a0aa54a302fbd7fff4ed7ad8a8547587d37b63324fc4af652bfa685ee9f8da44.yml +openapi_spec_hash: e45c5af19307cfc8b9baa4b8f8e865a0 config_hash: 7f49c38fa3abe9b7038ffe62262c4912 diff --git a/src/openai/resources/responses/responses.py b/src/openai/resources/responses/responses.py index c85a94495d..2ad1e6716c 100644 --- a/src/openai/resources/responses/responses.py +++ b/src/openai/resources/responses/responses.py @@ -1660,7 +1660,6 @@ def compact( input: Union[str, Iterable[ResponseInputItemParam], None] | Omit = omit, instructions: Optional[str] | Omit = omit, previous_response_id: Optional[str] | Omit = omit, - prompt_cache_key: Optional[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1696,8 +1695,6 @@ def compact( [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - prompt_cache_key: A key to use when reading from or writing to the prompt cache. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1714,7 +1711,6 @@ def compact( "input": input, "instructions": instructions, "previous_response_id": previous_response_id, - "prompt_cache_key": prompt_cache_key, }, response_compact_params.ResponseCompactParams, ), @@ -3325,7 +3321,6 @@ async def compact( input: Union[str, Iterable[ResponseInputItemParam], None] | Omit = omit, instructions: Optional[str] | Omit = omit, previous_response_id: Optional[str] | Omit = omit, - prompt_cache_key: Optional[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3361,8 +3356,6 @@ async def compact( [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. - prompt_cache_key: A key to use when reading from or writing to the prompt cache. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3379,7 +3372,6 @@ async def compact( "input": input, "instructions": instructions, "previous_response_id": previous_response_id, - "prompt_cache_key": prompt_cache_key, }, response_compact_params.ResponseCompactParams, ), diff --git a/src/openai/types/responses/easy_input_message.py b/src/openai/types/responses/easy_input_message.py index 6f4d782734..9a36a6b084 100644 --- a/src/openai/types/responses/easy_input_message.py +++ b/src/openai/types/responses/easy_input_message.py @@ -30,14 +30,5 @@ class EasyInputMessage(BaseModel): One of `user`, `assistant`, `system`, or `developer`. """ - phase: Optional[Literal["commentary", "final_answer"]] = None - """The phase of an assistant message. - - Use `commentary` for an intermediate assistant message and `final_answer` for - the final assistant message. For follow-up requests with models like - `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. - Omitting it can degrade performance. Not used for user messages. - """ - type: Optional[Literal["message"]] = None """The type of the message input. Always `message`.""" diff --git a/src/openai/types/responses/easy_input_message_param.py b/src/openai/types/responses/easy_input_message_param.py index f7eb42ba71..0a382bddee 100644 --- a/src/openai/types/responses/easy_input_message_param.py +++ b/src/openai/types/responses/easy_input_message_param.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Union, Optional +from typing import Union from typing_extensions import Literal, Required, TypedDict from .response_input_message_content_list_param import ResponseInputMessageContentListParam @@ -31,14 +31,5 @@ class EasyInputMessageParam(TypedDict, total=False): One of `user`, `assistant`, `system`, or `developer`. """ - phase: Optional[Literal["commentary", "final_answer"]] - """The phase of an assistant message. - - Use `commentary` for an intermediate assistant message and `final_answer` for - the final assistant message. For follow-up requests with models like - `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. - Omitting it can degrade performance. Not used for user messages. - """ - type: Literal["message"] """The type of the message input. Always `message`.""" diff --git a/src/openai/types/responses/response_compact_params.py b/src/openai/types/responses/response_compact_params.py index 4fb0e7ddc3..657c6a0764 100644 --- a/src/openai/types/responses/response_compact_params.py +++ b/src/openai/types/responses/response_compact_params.py @@ -131,6 +131,3 @@ class ResponseCompactParams(TypedDict, total=False): [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. """ - - prompt_cache_key: Optional[str] - """A key to use when reading from or writing to the prompt cache.""" diff --git a/src/openai/types/responses/response_output_message.py b/src/openai/types/responses/response_output_message.py index a8720e1c57..9c1d1f97fc 100644 --- a/src/openai/types/responses/response_output_message.py +++ b/src/openai/types/responses/response_output_message.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union, Optional +from typing import List, Union from typing_extensions import Literal, Annotated, TypeAlias from ..._utils import PropertyInfo @@ -34,12 +34,3 @@ class ResponseOutputMessage(BaseModel): type: Literal["message"] """The type of the output message. Always `message`.""" - - phase: Optional[Literal["commentary", "final_answer"]] = None - """The phase of an assistant message. - - Use `commentary` for an intermediate assistant message and `final_answer` for - the final assistant message. For follow-up requests with models like - `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. - Omitting it can degrade performance. Not used for user messages. - """ diff --git a/src/openai/types/responses/response_output_message_param.py b/src/openai/types/responses/response_output_message_param.py index 5d488d8c6b..9c2f5246a1 100644 --- a/src/openai/types/responses/response_output_message_param.py +++ b/src/openai/types/responses/response_output_message_param.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Union, Iterable, Optional +from typing import Union, Iterable from typing_extensions import Literal, Required, TypeAlias, TypedDict from .response_output_text_param import ResponseOutputTextParam @@ -34,12 +34,3 @@ class ResponseOutputMessageParam(TypedDict, total=False): type: Required[Literal["message"]] """The type of the output message. Always `message`.""" - - phase: Optional[Literal["commentary", "final_answer"]] - """The phase of an assistant message. - - Use `commentary` for an intermediate assistant message and `final_answer` for - the final assistant message. For follow-up requests with models like - `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. - Omitting it can degrade performance. Not used for user messages. - """ diff --git a/tests/api_resources/conversations/test_items.py b/tests/api_resources/conversations/test_items.py index aca9568410..0503301f16 100644 --- a/tests/api_resources/conversations/test_items.py +++ b/tests/api_resources/conversations/test_items.py @@ -44,7 +44,6 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None: { "content": "string", "role": "user", - "phase": "commentary", "type": "message", } ], @@ -286,7 +285,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> { "content": "string", "role": "user", - "phase": "commentary", "type": "message", } ], diff --git a/tests/api_resources/test_conversations.py b/tests/api_resources/test_conversations.py index a451d339e8..d21e685a04 100644 --- a/tests/api_resources/test_conversations.py +++ b/tests/api_resources/test_conversations.py @@ -32,7 +32,6 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None: { "content": "string", "role": "user", - "phase": "commentary", "type": "message", } ], @@ -196,7 +195,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> { "content": "string", "role": "user", - "phase": "commentary", "type": "message", } ], diff --git a/tests/api_resources/test_responses.py b/tests/api_resources/test_responses.py index 8f82f2046d..a644b2c6b9 100644 --- a/tests/api_resources/test_responses.py +++ b/tests/api_resources/test_responses.py @@ -385,7 +385,6 @@ def test_method_compact_with_all_params(self, client: OpenAI) -> None: input="string", instructions="instructions", previous_response_id="resp_123", - prompt_cache_key="prompt_cache_key", ) assert_matches_type(CompactedResponse, response, path=["response"]) @@ -794,7 +793,6 @@ async def test_method_compact_with_all_params(self, async_client: AsyncOpenAI) - input="string", instructions="instructions", previous_response_id="resp_123", - prompt_cache_key="prompt_cache_key", ) assert_matches_type(CompactedResponse, response, path=["response"]) From 1b27b5a834f5cb75f80c597259d0df0352ba83bd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 20:16:23 +0000 Subject: [PATCH 2/7] fix(api): readd phase --- .stats.yml | 4 ++-- src/openai/resources/responses/responses.py | 8 ++++++++ src/openai/types/responses/easy_input_message.py | 8 ++++++++ src/openai/types/responses/easy_input_message_param.py | 10 +++++++++- src/openai/types/responses/response_compact_params.py | 3 +++ src/openai/types/responses/response_output_message.py | 10 +++++++++- .../types/responses/response_output_message_param.py | 10 +++++++++- tests/api_resources/conversations/test_items.py | 2 ++ tests/api_resources/test_conversations.py | 2 ++ tests/api_resources/test_responses.py | 2 ++ 10 files changed, 54 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6c9e230e9b..785dbdba65 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 148 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-a0aa54a302fbd7fff4ed7ad8a8547587d37b63324fc4af652bfa685ee9f8da44.yml -openapi_spec_hash: e45c5af19307cfc8b9baa4b8f8e865a0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-ca4985bc94b25eac84a5d7538d1bdf134c9b99dae9e95f1eae0aae90130c4bf8.yml +openapi_spec_hash: 855db4b2dbaf3f8f83afe0df66397c02 config_hash: 7f49c38fa3abe9b7038ffe62262c4912 diff --git a/src/openai/resources/responses/responses.py b/src/openai/resources/responses/responses.py index 2ad1e6716c..c85a94495d 100644 --- a/src/openai/resources/responses/responses.py +++ b/src/openai/resources/responses/responses.py @@ -1660,6 +1660,7 @@ def compact( input: Union[str, Iterable[ResponseInputItemParam], None] | Omit = omit, instructions: Optional[str] | Omit = omit, previous_response_id: Optional[str] | Omit = omit, + prompt_cache_key: Optional[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1695,6 +1696,8 @@ def compact( [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + prompt_cache_key: A key to use when reading from or writing to the prompt cache. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1711,6 +1714,7 @@ def compact( "input": input, "instructions": instructions, "previous_response_id": previous_response_id, + "prompt_cache_key": prompt_cache_key, }, response_compact_params.ResponseCompactParams, ), @@ -3321,6 +3325,7 @@ async def compact( input: Union[str, Iterable[ResponseInputItemParam], None] | Omit = omit, instructions: Optional[str] | Omit = omit, previous_response_id: Optional[str] | Omit = omit, + prompt_cache_key: Optional[str] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -3356,6 +3361,8 @@ async def compact( [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. + prompt_cache_key: A key to use when reading from or writing to the prompt cache. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -3372,6 +3379,7 @@ async def compact( "input": input, "instructions": instructions, "previous_response_id": previous_response_id, + "prompt_cache_key": prompt_cache_key, }, response_compact_params.ResponseCompactParams, ), diff --git a/src/openai/types/responses/easy_input_message.py b/src/openai/types/responses/easy_input_message.py index 9a36a6b084..c3add7d195 100644 --- a/src/openai/types/responses/easy_input_message.py +++ b/src/openai/types/responses/easy_input_message.py @@ -30,5 +30,13 @@ class EasyInputMessage(BaseModel): One of `user`, `assistant`, `system`, or `developer`. """ + phase: Optional[Literal["commentary"]] = None + """ + Labels an `assistant` message as intermediate commentary (`commentary`) or the + final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when + sending follow-up requests, preserve and resend phase on all assistant messages + — dropping it can degrade performance. Not used for user messages. + """ + type: Optional[Literal["message"]] = None """The type of the message input. Always `message`.""" diff --git a/src/openai/types/responses/easy_input_message_param.py b/src/openai/types/responses/easy_input_message_param.py index 0a382bddee..2b3f454756 100644 --- a/src/openai/types/responses/easy_input_message_param.py +++ b/src/openai/types/responses/easy_input_message_param.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Union +from typing import Union, Optional from typing_extensions import Literal, Required, TypedDict from .response_input_message_content_list_param import ResponseInputMessageContentListParam @@ -31,5 +31,13 @@ class EasyInputMessageParam(TypedDict, total=False): One of `user`, `assistant`, `system`, or `developer`. """ + phase: Optional[Literal["commentary"]] + """ + Labels an `assistant` message as intermediate commentary (`commentary`) or the + final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when + sending follow-up requests, preserve and resend phase on all assistant messages + — dropping it can degrade performance. Not used for user messages. + """ + type: Literal["message"] """The type of the message input. Always `message`.""" diff --git a/src/openai/types/responses/response_compact_params.py b/src/openai/types/responses/response_compact_params.py index 657c6a0764..4fb0e7ddc3 100644 --- a/src/openai/types/responses/response_compact_params.py +++ b/src/openai/types/responses/response_compact_params.py @@ -131,3 +131,6 @@ class ResponseCompactParams(TypedDict, total=False): [conversation state](https://platform.openai.com/docs/guides/conversation-state). Cannot be used in conjunction with `conversation`. """ + + prompt_cache_key: Optional[str] + """A key to use when reading from or writing to the prompt cache.""" diff --git a/src/openai/types/responses/response_output_message.py b/src/openai/types/responses/response_output_message.py index 9c1d1f97fc..09a1f88170 100644 --- a/src/openai/types/responses/response_output_message.py +++ b/src/openai/types/responses/response_output_message.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Union +from typing import List, Union, Optional from typing_extensions import Literal, Annotated, TypeAlias from ..._utils import PropertyInfo @@ -34,3 +34,11 @@ class ResponseOutputMessage(BaseModel): type: Literal["message"] """The type of the output message. Always `message`.""" + + phase: Optional[Literal["commentary"]] = None + """ + Labels an `assistant` message as intermediate commentary (`commentary`) or the + final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when + sending follow-up requests, preserve and resend phase on all assistant messages + — dropping it can degrade performance. Not used for user messages. + """ diff --git a/src/openai/types/responses/response_output_message_param.py b/src/openai/types/responses/response_output_message_param.py index 9c2f5246a1..3a054a5323 100644 --- a/src/openai/types/responses/response_output_message_param.py +++ b/src/openai/types/responses/response_output_message_param.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Union, Iterable +from typing import Union, Iterable, Optional from typing_extensions import Literal, Required, TypeAlias, TypedDict from .response_output_text_param import ResponseOutputTextParam @@ -34,3 +34,11 @@ class ResponseOutputMessageParam(TypedDict, total=False): type: Required[Literal["message"]] """The type of the output message. Always `message`.""" + + phase: Optional[Literal["commentary"]] + """ + Labels an `assistant` message as intermediate commentary (`commentary`) or the + final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when + sending follow-up requests, preserve and resend phase on all assistant messages + — dropping it can degrade performance. Not used for user messages. + """ diff --git a/tests/api_resources/conversations/test_items.py b/tests/api_resources/conversations/test_items.py index 0503301f16..aca9568410 100644 --- a/tests/api_resources/conversations/test_items.py +++ b/tests/api_resources/conversations/test_items.py @@ -44,6 +44,7 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None: { "content": "string", "role": "user", + "phase": "commentary", "type": "message", } ], @@ -285,6 +286,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> { "content": "string", "role": "user", + "phase": "commentary", "type": "message", } ], diff --git a/tests/api_resources/test_conversations.py b/tests/api_resources/test_conversations.py index d21e685a04..a451d339e8 100644 --- a/tests/api_resources/test_conversations.py +++ b/tests/api_resources/test_conversations.py @@ -32,6 +32,7 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None: { "content": "string", "role": "user", + "phase": "commentary", "type": "message", } ], @@ -195,6 +196,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> { "content": "string", "role": "user", + "phase": "commentary", "type": "message", } ], diff --git a/tests/api_resources/test_responses.py b/tests/api_resources/test_responses.py index a644b2c6b9..8f82f2046d 100644 --- a/tests/api_resources/test_responses.py +++ b/tests/api_resources/test_responses.py @@ -385,6 +385,7 @@ def test_method_compact_with_all_params(self, client: OpenAI) -> None: input="string", instructions="instructions", previous_response_id="resp_123", + prompt_cache_key="prompt_cache_key", ) assert_matches_type(CompactedResponse, response, path=["response"]) @@ -793,6 +794,7 @@ async def test_method_compact_with_all_params(self, async_client: AsyncOpenAI) - input="string", instructions="instructions", previous_response_id="resp_123", + prompt_cache_key="prompt_cache_key", ) assert_matches_type(CompactedResponse, response, path=["response"]) From 9fc323f4da6cfca9de194e12c1486a3cd1bfa4b5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 20:24:33 +0000 Subject: [PATCH 3/7] fix(api): manual updates --- .stats.yml | 4 ++-- src/openai/types/responses/easy_input_message.py | 5 +++++ src/openai/types/responses/easy_input_message_param.py | 5 +++++ src/openai/types/responses/response_output_message.py | 5 +++++ src/openai/types/responses/response_output_message_param.py | 5 +++++ 5 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 785dbdba65..6e10d4a51f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 148 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-ca4985bc94b25eac84a5d7538d1bdf134c9b99dae9e95f1eae0aae90130c4bf8.yml -openapi_spec_hash: 855db4b2dbaf3f8f83afe0df66397c02 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-4432c056f89389d4d43b695cbdf44f97df8169f63bbae2c15fc079a5766ced6e.yml +openapi_spec_hash: cbf649cc2c944fb3f77450ec752ab1e9 config_hash: 7f49c38fa3abe9b7038ffe62262c4912 diff --git a/src/openai/types/responses/easy_input_message.py b/src/openai/types/responses/easy_input_message.py index c3add7d195..0ac1fd2610 100644 --- a/src/openai/types/responses/easy_input_message.py +++ b/src/openai/types/responses/easy_input_message.py @@ -36,6 +36,11 @@ class EasyInputMessage(BaseModel): final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages. + + Use `commentary` for an intermediate assistant message and `final_answer` for + the final assistant message. For follow-up requests with models like + `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. + Omitting it can degrade performance. Not used for user messages. """ type: Optional[Literal["message"]] = None diff --git a/src/openai/types/responses/easy_input_message_param.py b/src/openai/types/responses/easy_input_message_param.py index 2b3f454756..b8affcbd5c 100644 --- a/src/openai/types/responses/easy_input_message_param.py +++ b/src/openai/types/responses/easy_input_message_param.py @@ -37,6 +37,11 @@ class EasyInputMessageParam(TypedDict, total=False): final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages. + + Use `commentary` for an intermediate assistant message and `final_answer` for + the final assistant message. For follow-up requests with models like + `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. + Omitting it can degrade performance. Not used for user messages. """ type: Literal["message"] diff --git a/src/openai/types/responses/response_output_message.py b/src/openai/types/responses/response_output_message.py index 09a1f88170..9cbb7fe5e6 100644 --- a/src/openai/types/responses/response_output_message.py +++ b/src/openai/types/responses/response_output_message.py @@ -41,4 +41,9 @@ class ResponseOutputMessage(BaseModel): final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages. + + Use `commentary` for an intermediate assistant message and `final_answer` for + the final assistant message. For follow-up requests with models like + `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. + Omitting it can degrade performance. Not used for user messages. """ diff --git a/src/openai/types/responses/response_output_message_param.py b/src/openai/types/responses/response_output_message_param.py index 3a054a5323..5284b4896f 100644 --- a/src/openai/types/responses/response_output_message_param.py +++ b/src/openai/types/responses/response_output_message_param.py @@ -41,4 +41,9 @@ class ResponseOutputMessageParam(TypedDict, total=False): final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when sending follow-up requests, preserve and resend phase on all assistant messages — dropping it can degrade performance. Not used for user messages. + + Use `commentary` for an intermediate assistant message and `final_answer` for + the final assistant message. For follow-up requests with models like + `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. + Omitting it can degrade performance. Not used for user messages. """ From 0c0f970cbd164131bf06f7ab38f170bbcb323683 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Feb 2026 21:31:34 +0000 Subject: [PATCH 4/7] fix(api): internal schema fixes --- .stats.yml | 4 ++-- src/openai/types/responses/easy_input_message.py | 2 +- src/openai/types/responses/easy_input_message_param.py | 2 +- src/openai/types/responses/response_output_message.py | 2 +- src/openai/types/responses/response_output_message_param.py | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6e10d4a51f..4cad4cab9d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 148 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-4432c056f89389d4d43b695cbdf44f97df8169f63bbae2c15fc079a5766ced6e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-b879fff3f51e71e4f1ce17f03efc017a46d888a1bfd88eb655a6210a86f02acf.yml openapi_spec_hash: cbf649cc2c944fb3f77450ec752ab1e9 -config_hash: 7f49c38fa3abe9b7038ffe62262c4912 +config_hash: 98b0cef9ae8aa65d4a2c6df50d044379 diff --git a/src/openai/types/responses/easy_input_message.py b/src/openai/types/responses/easy_input_message.py index 0ac1fd2610..7a45f2bce9 100644 --- a/src/openai/types/responses/easy_input_message.py +++ b/src/openai/types/responses/easy_input_message.py @@ -30,7 +30,7 @@ class EasyInputMessage(BaseModel): One of `user`, `assistant`, `system`, or `developer`. """ - phase: Optional[Literal["commentary"]] = None + phase: Optional[Literal["commentary", "final_answer"]] = None """ Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when diff --git a/src/openai/types/responses/easy_input_message_param.py b/src/openai/types/responses/easy_input_message_param.py index b8affcbd5c..7048e2034b 100644 --- a/src/openai/types/responses/easy_input_message_param.py +++ b/src/openai/types/responses/easy_input_message_param.py @@ -31,7 +31,7 @@ class EasyInputMessageParam(TypedDict, total=False): One of `user`, `assistant`, `system`, or `developer`. """ - phase: Optional[Literal["commentary"]] + phase: Optional[Literal["commentary", "final_answer"]] """ Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when diff --git a/src/openai/types/responses/response_output_message.py b/src/openai/types/responses/response_output_message.py index 9cbb7fe5e6..62f0ed437f 100644 --- a/src/openai/types/responses/response_output_message.py +++ b/src/openai/types/responses/response_output_message.py @@ -35,7 +35,7 @@ class ResponseOutputMessage(BaseModel): type: Literal["message"] """The type of the output message. Always `message`.""" - phase: Optional[Literal["commentary"]] = None + phase: Optional[Literal["commentary", "final_answer"]] = None """ Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when diff --git a/src/openai/types/responses/response_output_message_param.py b/src/openai/types/responses/response_output_message_param.py index 5284b4896f..20c1384739 100644 --- a/src/openai/types/responses/response_output_message_param.py +++ b/src/openai/types/responses/response_output_message_param.py @@ -35,7 +35,7 @@ class ResponseOutputMessageParam(TypedDict, total=False): type: Required[Literal["message"]] """The type of the output message. Always `message`.""" - phase: Optional[Literal["commentary"]] + phase: Optional[Literal["commentary", "final_answer"]] """ Labels an `assistant` message as intermediate commentary (`commentary`) or the final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when From f11ffe882ef8887d3aa4b8dd70e0626135209eff Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 15:26:27 +0000 Subject: [PATCH 5/7] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4cad4cab9d..d33009004b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 148 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-b879fff3f51e71e4f1ce17f03efc017a46d888a1bfd88eb655a6210a86f02acf.yml openapi_spec_hash: cbf649cc2c944fb3f77450ec752ab1e9 -config_hash: 98b0cef9ae8aa65d4a2c6df50d044379 +config_hash: 7ce3344e237b57dccafe71cb9413ddd4 From b1de9419a68fd6fb97a63f415fb3d1e5851582cb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Mar 2026 02:19:09 +0000 Subject: [PATCH 6/7] chore(internal): codegen related update --- src/openai/_client.py | 108 ++++++++++++++++++ src/openai/resources/audio/audio.py | 18 +++ src/openai/resources/audio/speech.py | 4 + src/openai/resources/audio/transcriptions.py | 4 + src/openai/resources/audio/translations.py | 4 + src/openai/resources/batches.py | 4 + src/openai/resources/beta/assistants.py | 4 + src/openai/resources/beta/beta.py | 12 ++ src/openai/resources/beta/threads/messages.py | 4 + .../resources/beta/threads/runs/runs.py | 10 ++ .../resources/beta/threads/runs/steps.py | 4 + src/openai/resources/beta/threads/threads.py | 16 +++ src/openai/resources/chat/chat.py | 18 +++ .../resources/chat/completions/completions.py | 26 +++++ .../resources/chat/completions/messages.py | 8 ++ src/openai/resources/completions.py | 8 ++ .../resources/conversations/conversations.py | 10 ++ src/openai/resources/conversations/items.py | 4 + src/openai/resources/embeddings.py | 8 ++ src/openai/resources/evals/evals.py | 10 ++ .../resources/evals/runs/output_items.py | 4 + src/openai/resources/evals/runs/runs.py | 10 ++ src/openai/resources/files.py | 8 ++ .../resources/fine_tuning/alpha/alpha.py | 6 + .../resources/fine_tuning/alpha/graders.py | 4 + .../fine_tuning/checkpoints/checkpoints.py | 6 + .../fine_tuning/checkpoints/permissions.py | 4 + .../resources/fine_tuning/fine_tuning.py | 6 + .../resources/fine_tuning/jobs/checkpoints.py | 4 + src/openai/resources/fine_tuning/jobs/jobs.py | 10 ++ src/openai/resources/images.py | 4 + src/openai/resources/models.py | 4 + src/openai/resources/moderations.py | 8 ++ src/openai/resources/uploads/parts.py | 4 + src/openai/resources/uploads/uploads.py | 10 ++ 35 files changed, 376 insertions(+) diff --git a/src/openai/_client.py b/src/openai/_client.py index 0399bbf742..aadf3601f2 100644 --- a/src/openai/_client.py +++ b/src/openai/_client.py @@ -180,6 +180,9 @@ def __init__( @cached_property def completions(self) -> Completions: + """ + Given a prompt, the model will return one or more predicted completions, and can also return the probabilities of alternative tokens at each position. + """ from .resources.completions import Completions return Completions(self) @@ -192,18 +195,25 @@ def chat(self) -> Chat: @cached_property def embeddings(self) -> Embeddings: + """ + Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms. + """ from .resources.embeddings import Embeddings return Embeddings(self) @cached_property def files(self) -> Files: + """ + Files are used to upload documents that can be used with features like Assistants and Fine-tuning. + """ from .resources.files import Files return Files(self) @cached_property def images(self) -> Images: + """Given a prompt and/or an input image, the model will generate a new image.""" from .resources.images import Images return Images(self) @@ -216,12 +226,16 @@ def audio(self) -> Audio: @cached_property def moderations(self) -> Moderations: + """ + Given text and/or image inputs, classifies if those inputs are potentially harmful. + """ from .resources.moderations import Moderations return Moderations(self) @cached_property def models(self) -> Models: + """List and describe the various models available in the API.""" from .resources.models import Models return Models(self) @@ -252,12 +266,14 @@ def beta(self) -> Beta: @cached_property def batches(self) -> Batches: + """Create large batches of API requests to run asynchronously.""" from .resources.batches import Batches return Batches(self) @cached_property def uploads(self) -> Uploads: + """Use Uploads to upload large files in multiple parts.""" from .resources.uploads import Uploads return Uploads(self) @@ -276,12 +292,14 @@ def realtime(self) -> Realtime: @cached_property def conversations(self) -> Conversations: + """Manage conversations and conversation items.""" from .resources.conversations import Conversations return Conversations(self) @cached_property def evals(self) -> Evals: + """Manage and run evals in the OpenAI platform.""" from .resources.evals import Evals return Evals(self) @@ -537,6 +555,9 @@ def __init__( @cached_property def completions(self) -> AsyncCompletions: + """ + Given a prompt, the model will return one or more predicted completions, and can also return the probabilities of alternative tokens at each position. + """ from .resources.completions import AsyncCompletions return AsyncCompletions(self) @@ -549,18 +570,25 @@ def chat(self) -> AsyncChat: @cached_property def embeddings(self) -> AsyncEmbeddings: + """ + Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms. + """ from .resources.embeddings import AsyncEmbeddings return AsyncEmbeddings(self) @cached_property def files(self) -> AsyncFiles: + """ + Files are used to upload documents that can be used with features like Assistants and Fine-tuning. + """ from .resources.files import AsyncFiles return AsyncFiles(self) @cached_property def images(self) -> AsyncImages: + """Given a prompt and/or an input image, the model will generate a new image.""" from .resources.images import AsyncImages return AsyncImages(self) @@ -573,12 +601,16 @@ def audio(self) -> AsyncAudio: @cached_property def moderations(self) -> AsyncModerations: + """ + Given text and/or image inputs, classifies if those inputs are potentially harmful. + """ from .resources.moderations import AsyncModerations return AsyncModerations(self) @cached_property def models(self) -> AsyncModels: + """List and describe the various models available in the API.""" from .resources.models import AsyncModels return AsyncModels(self) @@ -609,12 +641,14 @@ def beta(self) -> AsyncBeta: @cached_property def batches(self) -> AsyncBatches: + """Create large batches of API requests to run asynchronously.""" from .resources.batches import AsyncBatches return AsyncBatches(self) @cached_property def uploads(self) -> AsyncUploads: + """Use Uploads to upload large files in multiple parts.""" from .resources.uploads import AsyncUploads return AsyncUploads(self) @@ -633,12 +667,14 @@ def realtime(self) -> AsyncRealtime: @cached_property def conversations(self) -> AsyncConversations: + """Manage conversations and conversation items.""" from .resources.conversations import AsyncConversations return AsyncConversations(self) @cached_property def evals(self) -> AsyncEvals: + """Manage and run evals in the OpenAI platform.""" from .resources.evals import AsyncEvals return AsyncEvals(self) @@ -805,6 +841,9 @@ def __init__(self, client: OpenAI) -> None: @cached_property def completions(self) -> completions.CompletionsWithRawResponse: + """ + Given a prompt, the model will return one or more predicted completions, and can also return the probabilities of alternative tokens at each position. + """ from .resources.completions import CompletionsWithRawResponse return CompletionsWithRawResponse(self._client.completions) @@ -817,18 +856,25 @@ def chat(self) -> chat.ChatWithRawResponse: @cached_property def embeddings(self) -> embeddings.EmbeddingsWithRawResponse: + """ + Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms. + """ from .resources.embeddings import EmbeddingsWithRawResponse return EmbeddingsWithRawResponse(self._client.embeddings) @cached_property def files(self) -> files.FilesWithRawResponse: + """ + Files are used to upload documents that can be used with features like Assistants and Fine-tuning. + """ from .resources.files import FilesWithRawResponse return FilesWithRawResponse(self._client.files) @cached_property def images(self) -> images.ImagesWithRawResponse: + """Given a prompt and/or an input image, the model will generate a new image.""" from .resources.images import ImagesWithRawResponse return ImagesWithRawResponse(self._client.images) @@ -841,12 +887,16 @@ def audio(self) -> audio.AudioWithRawResponse: @cached_property def moderations(self) -> moderations.ModerationsWithRawResponse: + """ + Given text and/or image inputs, classifies if those inputs are potentially harmful. + """ from .resources.moderations import ModerationsWithRawResponse return ModerationsWithRawResponse(self._client.moderations) @cached_property def models(self) -> models.ModelsWithRawResponse: + """List and describe the various models available in the API.""" from .resources.models import ModelsWithRawResponse return ModelsWithRawResponse(self._client.models) @@ -871,12 +921,14 @@ def beta(self) -> beta.BetaWithRawResponse: @cached_property def batches(self) -> batches.BatchesWithRawResponse: + """Create large batches of API requests to run asynchronously.""" from .resources.batches import BatchesWithRawResponse return BatchesWithRawResponse(self._client.batches) @cached_property def uploads(self) -> uploads.UploadsWithRawResponse: + """Use Uploads to upload large files in multiple parts.""" from .resources.uploads import UploadsWithRawResponse return UploadsWithRawResponse(self._client.uploads) @@ -895,12 +947,14 @@ def realtime(self) -> realtime.RealtimeWithRawResponse: @cached_property def conversations(self) -> conversations.ConversationsWithRawResponse: + """Manage conversations and conversation items.""" from .resources.conversations import ConversationsWithRawResponse return ConversationsWithRawResponse(self._client.conversations) @cached_property def evals(self) -> evals.EvalsWithRawResponse: + """Manage and run evals in the OpenAI platform.""" from .resources.evals import EvalsWithRawResponse return EvalsWithRawResponse(self._client.evals) @@ -932,6 +986,9 @@ def __init__(self, client: AsyncOpenAI) -> None: @cached_property def completions(self) -> completions.AsyncCompletionsWithRawResponse: + """ + Given a prompt, the model will return one or more predicted completions, and can also return the probabilities of alternative tokens at each position. + """ from .resources.completions import AsyncCompletionsWithRawResponse return AsyncCompletionsWithRawResponse(self._client.completions) @@ -944,18 +1001,25 @@ def chat(self) -> chat.AsyncChatWithRawResponse: @cached_property def embeddings(self) -> embeddings.AsyncEmbeddingsWithRawResponse: + """ + Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms. + """ from .resources.embeddings import AsyncEmbeddingsWithRawResponse return AsyncEmbeddingsWithRawResponse(self._client.embeddings) @cached_property def files(self) -> files.AsyncFilesWithRawResponse: + """ + Files are used to upload documents that can be used with features like Assistants and Fine-tuning. + """ from .resources.files import AsyncFilesWithRawResponse return AsyncFilesWithRawResponse(self._client.files) @cached_property def images(self) -> images.AsyncImagesWithRawResponse: + """Given a prompt and/or an input image, the model will generate a new image.""" from .resources.images import AsyncImagesWithRawResponse return AsyncImagesWithRawResponse(self._client.images) @@ -968,12 +1032,16 @@ def audio(self) -> audio.AsyncAudioWithRawResponse: @cached_property def moderations(self) -> moderations.AsyncModerationsWithRawResponse: + """ + Given text and/or image inputs, classifies if those inputs are potentially harmful. + """ from .resources.moderations import AsyncModerationsWithRawResponse return AsyncModerationsWithRawResponse(self._client.moderations) @cached_property def models(self) -> models.AsyncModelsWithRawResponse: + """List and describe the various models available in the API.""" from .resources.models import AsyncModelsWithRawResponse return AsyncModelsWithRawResponse(self._client.models) @@ -998,12 +1066,14 @@ def beta(self) -> beta.AsyncBetaWithRawResponse: @cached_property def batches(self) -> batches.AsyncBatchesWithRawResponse: + """Create large batches of API requests to run asynchronously.""" from .resources.batches import AsyncBatchesWithRawResponse return AsyncBatchesWithRawResponse(self._client.batches) @cached_property def uploads(self) -> uploads.AsyncUploadsWithRawResponse: + """Use Uploads to upload large files in multiple parts.""" from .resources.uploads import AsyncUploadsWithRawResponse return AsyncUploadsWithRawResponse(self._client.uploads) @@ -1022,12 +1092,14 @@ def realtime(self) -> realtime.AsyncRealtimeWithRawResponse: @cached_property def conversations(self) -> conversations.AsyncConversationsWithRawResponse: + """Manage conversations and conversation items.""" from .resources.conversations import AsyncConversationsWithRawResponse return AsyncConversationsWithRawResponse(self._client.conversations) @cached_property def evals(self) -> evals.AsyncEvalsWithRawResponse: + """Manage and run evals in the OpenAI platform.""" from .resources.evals import AsyncEvalsWithRawResponse return AsyncEvalsWithRawResponse(self._client.evals) @@ -1059,6 +1131,9 @@ def __init__(self, client: OpenAI) -> None: @cached_property def completions(self) -> completions.CompletionsWithStreamingResponse: + """ + Given a prompt, the model will return one or more predicted completions, and can also return the probabilities of alternative tokens at each position. + """ from .resources.completions import CompletionsWithStreamingResponse return CompletionsWithStreamingResponse(self._client.completions) @@ -1071,18 +1146,25 @@ def chat(self) -> chat.ChatWithStreamingResponse: @cached_property def embeddings(self) -> embeddings.EmbeddingsWithStreamingResponse: + """ + Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms. + """ from .resources.embeddings import EmbeddingsWithStreamingResponse return EmbeddingsWithStreamingResponse(self._client.embeddings) @cached_property def files(self) -> files.FilesWithStreamingResponse: + """ + Files are used to upload documents that can be used with features like Assistants and Fine-tuning. + """ from .resources.files import FilesWithStreamingResponse return FilesWithStreamingResponse(self._client.files) @cached_property def images(self) -> images.ImagesWithStreamingResponse: + """Given a prompt and/or an input image, the model will generate a new image.""" from .resources.images import ImagesWithStreamingResponse return ImagesWithStreamingResponse(self._client.images) @@ -1095,12 +1177,16 @@ def audio(self) -> audio.AudioWithStreamingResponse: @cached_property def moderations(self) -> moderations.ModerationsWithStreamingResponse: + """ + Given text and/or image inputs, classifies if those inputs are potentially harmful. + """ from .resources.moderations import ModerationsWithStreamingResponse return ModerationsWithStreamingResponse(self._client.moderations) @cached_property def models(self) -> models.ModelsWithStreamingResponse: + """List and describe the various models available in the API.""" from .resources.models import ModelsWithStreamingResponse return ModelsWithStreamingResponse(self._client.models) @@ -1125,12 +1211,14 @@ def beta(self) -> beta.BetaWithStreamingResponse: @cached_property def batches(self) -> batches.BatchesWithStreamingResponse: + """Create large batches of API requests to run asynchronously.""" from .resources.batches import BatchesWithStreamingResponse return BatchesWithStreamingResponse(self._client.batches) @cached_property def uploads(self) -> uploads.UploadsWithStreamingResponse: + """Use Uploads to upload large files in multiple parts.""" from .resources.uploads import UploadsWithStreamingResponse return UploadsWithStreamingResponse(self._client.uploads) @@ -1149,12 +1237,14 @@ def realtime(self) -> realtime.RealtimeWithStreamingResponse: @cached_property def conversations(self) -> conversations.ConversationsWithStreamingResponse: + """Manage conversations and conversation items.""" from .resources.conversations import ConversationsWithStreamingResponse return ConversationsWithStreamingResponse(self._client.conversations) @cached_property def evals(self) -> evals.EvalsWithStreamingResponse: + """Manage and run evals in the OpenAI platform.""" from .resources.evals import EvalsWithStreamingResponse return EvalsWithStreamingResponse(self._client.evals) @@ -1186,6 +1276,9 @@ def __init__(self, client: AsyncOpenAI) -> None: @cached_property def completions(self) -> completions.AsyncCompletionsWithStreamingResponse: + """ + Given a prompt, the model will return one or more predicted completions, and can also return the probabilities of alternative tokens at each position. + """ from .resources.completions import AsyncCompletionsWithStreamingResponse return AsyncCompletionsWithStreamingResponse(self._client.completions) @@ -1198,18 +1291,25 @@ def chat(self) -> chat.AsyncChatWithStreamingResponse: @cached_property def embeddings(self) -> embeddings.AsyncEmbeddingsWithStreamingResponse: + """ + Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms. + """ from .resources.embeddings import AsyncEmbeddingsWithStreamingResponse return AsyncEmbeddingsWithStreamingResponse(self._client.embeddings) @cached_property def files(self) -> files.AsyncFilesWithStreamingResponse: + """ + Files are used to upload documents that can be used with features like Assistants and Fine-tuning. + """ from .resources.files import AsyncFilesWithStreamingResponse return AsyncFilesWithStreamingResponse(self._client.files) @cached_property def images(self) -> images.AsyncImagesWithStreamingResponse: + """Given a prompt and/or an input image, the model will generate a new image.""" from .resources.images import AsyncImagesWithStreamingResponse return AsyncImagesWithStreamingResponse(self._client.images) @@ -1222,12 +1322,16 @@ def audio(self) -> audio.AsyncAudioWithStreamingResponse: @cached_property def moderations(self) -> moderations.AsyncModerationsWithStreamingResponse: + """ + Given text and/or image inputs, classifies if those inputs are potentially harmful. + """ from .resources.moderations import AsyncModerationsWithStreamingResponse return AsyncModerationsWithStreamingResponse(self._client.moderations) @cached_property def models(self) -> models.AsyncModelsWithStreamingResponse: + """List and describe the various models available in the API.""" from .resources.models import AsyncModelsWithStreamingResponse return AsyncModelsWithStreamingResponse(self._client.models) @@ -1252,12 +1356,14 @@ def beta(self) -> beta.AsyncBetaWithStreamingResponse: @cached_property def batches(self) -> batches.AsyncBatchesWithStreamingResponse: + """Create large batches of API requests to run asynchronously.""" from .resources.batches import AsyncBatchesWithStreamingResponse return AsyncBatchesWithStreamingResponse(self._client.batches) @cached_property def uploads(self) -> uploads.AsyncUploadsWithStreamingResponse: + """Use Uploads to upload large files in multiple parts.""" from .resources.uploads import AsyncUploadsWithStreamingResponse return AsyncUploadsWithStreamingResponse(self._client.uploads) @@ -1276,12 +1382,14 @@ def realtime(self) -> realtime.AsyncRealtimeWithStreamingResponse: @cached_property def conversations(self) -> conversations.AsyncConversationsWithStreamingResponse: + """Manage conversations and conversation items.""" from .resources.conversations import AsyncConversationsWithStreamingResponse return AsyncConversationsWithStreamingResponse(self._client.conversations) @cached_property def evals(self) -> evals.AsyncEvalsWithStreamingResponse: + """Manage and run evals in the OpenAI platform.""" from .resources.evals import AsyncEvalsWithStreamingResponse return AsyncEvalsWithStreamingResponse(self._client.evals) diff --git a/src/openai/resources/audio/audio.py b/src/openai/resources/audio/audio.py index 383b7073bf..040a058df6 100644 --- a/src/openai/resources/audio/audio.py +++ b/src/openai/resources/audio/audio.py @@ -35,14 +35,17 @@ class Audio(SyncAPIResource): @cached_property def transcriptions(self) -> Transcriptions: + """Turn audio into text or text into audio.""" return Transcriptions(self._client) @cached_property def translations(self) -> Translations: + """Turn audio into text or text into audio.""" return Translations(self._client) @cached_property def speech(self) -> Speech: + """Turn audio into text or text into audio.""" return Speech(self._client) @cached_property @@ -68,14 +71,17 @@ def with_streaming_response(self) -> AudioWithStreamingResponse: class AsyncAudio(AsyncAPIResource): @cached_property def transcriptions(self) -> AsyncTranscriptions: + """Turn audio into text or text into audio.""" return AsyncTranscriptions(self._client) @cached_property def translations(self) -> AsyncTranslations: + """Turn audio into text or text into audio.""" return AsyncTranslations(self._client) @cached_property def speech(self) -> AsyncSpeech: + """Turn audio into text or text into audio.""" return AsyncSpeech(self._client) @cached_property @@ -104,14 +110,17 @@ def __init__(self, audio: Audio) -> None: @cached_property def transcriptions(self) -> TranscriptionsWithRawResponse: + """Turn audio into text or text into audio.""" return TranscriptionsWithRawResponse(self._audio.transcriptions) @cached_property def translations(self) -> TranslationsWithRawResponse: + """Turn audio into text or text into audio.""" return TranslationsWithRawResponse(self._audio.translations) @cached_property def speech(self) -> SpeechWithRawResponse: + """Turn audio into text or text into audio.""" return SpeechWithRawResponse(self._audio.speech) @@ -121,14 +130,17 @@ def __init__(self, audio: AsyncAudio) -> None: @cached_property def transcriptions(self) -> AsyncTranscriptionsWithRawResponse: + """Turn audio into text or text into audio.""" return AsyncTranscriptionsWithRawResponse(self._audio.transcriptions) @cached_property def translations(self) -> AsyncTranslationsWithRawResponse: + """Turn audio into text or text into audio.""" return AsyncTranslationsWithRawResponse(self._audio.translations) @cached_property def speech(self) -> AsyncSpeechWithRawResponse: + """Turn audio into text or text into audio.""" return AsyncSpeechWithRawResponse(self._audio.speech) @@ -138,14 +150,17 @@ def __init__(self, audio: Audio) -> None: @cached_property def transcriptions(self) -> TranscriptionsWithStreamingResponse: + """Turn audio into text or text into audio.""" return TranscriptionsWithStreamingResponse(self._audio.transcriptions) @cached_property def translations(self) -> TranslationsWithStreamingResponse: + """Turn audio into text or text into audio.""" return TranslationsWithStreamingResponse(self._audio.translations) @cached_property def speech(self) -> SpeechWithStreamingResponse: + """Turn audio into text or text into audio.""" return SpeechWithStreamingResponse(self._audio.speech) @@ -155,12 +170,15 @@ def __init__(self, audio: AsyncAudio) -> None: @cached_property def transcriptions(self) -> AsyncTranscriptionsWithStreamingResponse: + """Turn audio into text or text into audio.""" return AsyncTranscriptionsWithStreamingResponse(self._audio.transcriptions) @cached_property def translations(self) -> AsyncTranslationsWithStreamingResponse: + """Turn audio into text or text into audio.""" return AsyncTranslationsWithStreamingResponse(self._audio.translations) @cached_property def speech(self) -> AsyncSpeechWithStreamingResponse: + """Turn audio into text or text into audio.""" return AsyncSpeechWithStreamingResponse(self._audio.speech) diff --git a/src/openai/resources/audio/speech.py b/src/openai/resources/audio/speech.py index 96a32f9268..f937321baa 100644 --- a/src/openai/resources/audio/speech.py +++ b/src/openai/resources/audio/speech.py @@ -26,6 +26,8 @@ class Speech(SyncAPIResource): + """Turn audio into text or text into audio.""" + @cached_property def with_raw_response(self) -> SpeechWithRawResponse: """ @@ -125,6 +127,8 @@ def create( class AsyncSpeech(AsyncAPIResource): + """Turn audio into text or text into audio.""" + @cached_property def with_raw_response(self) -> AsyncSpeechWithRawResponse: """ diff --git a/src/openai/resources/audio/transcriptions.py b/src/openai/resources/audio/transcriptions.py index bc6e9f22de..25e6e0cb5e 100644 --- a/src/openai/resources/audio/transcriptions.py +++ b/src/openai/resources/audio/transcriptions.py @@ -42,6 +42,8 @@ class Transcriptions(SyncAPIResource): + """Turn audio into text or text into audio.""" + @cached_property def with_raw_response(self) -> TranscriptionsWithRawResponse: """ @@ -497,6 +499,8 @@ def create( class AsyncTranscriptions(AsyncAPIResource): + """Turn audio into text or text into audio.""" + @cached_property def with_raw_response(self) -> AsyncTranscriptionsWithRawResponse: """ diff --git a/src/openai/resources/audio/translations.py b/src/openai/resources/audio/translations.py index 310f901fb3..0751a65586 100644 --- a/src/openai/resources/audio/translations.py +++ b/src/openai/resources/audio/translations.py @@ -27,6 +27,8 @@ class Translations(SyncAPIResource): + """Turn audio into text or text into audio.""" + @cached_property def with_raw_response(self) -> TranslationsWithRawResponse: """ @@ -170,6 +172,8 @@ def create( class AsyncTranslations(AsyncAPIResource): + """Turn audio into text or text into audio.""" + @cached_property def with_raw_response(self) -> AsyncTranslationsWithRawResponse: """ diff --git a/src/openai/resources/batches.py b/src/openai/resources/batches.py index bc856bf5aa..005a32870e 100644 --- a/src/openai/resources/batches.py +++ b/src/openai/resources/batches.py @@ -23,6 +23,8 @@ class Batches(SyncAPIResource): + """Create large batches of API requests to run asynchronously.""" + @cached_property def with_raw_response(self) -> BatchesWithRawResponse: """ @@ -247,6 +249,8 @@ def cancel( class AsyncBatches(AsyncAPIResource): + """Create large batches of API requests to run asynchronously.""" + @cached_property def with_raw_response(self) -> AsyncBatchesWithRawResponse: """ diff --git a/src/openai/resources/beta/assistants.py b/src/openai/resources/beta/assistants.py index 8c69700059..bf22122553 100644 --- a/src/openai/resources/beta/assistants.py +++ b/src/openai/resources/beta/assistants.py @@ -33,6 +33,8 @@ class Assistants(SyncAPIResource): + """Build Assistants that can call models and use tools.""" + @cached_property def with_raw_response(self) -> AssistantsWithRawResponse: """ @@ -507,6 +509,8 @@ def delete( class AsyncAssistants(AsyncAPIResource): + """Build Assistants that can call models and use tools.""" + @cached_property def with_raw_response(self) -> AsyncAssistantsWithRawResponse: """ diff --git a/src/openai/resources/beta/beta.py b/src/openai/resources/beta/beta.py index 5ee3639db1..388a1c5d1f 100644 --- a/src/openai/resources/beta/beta.py +++ b/src/openai/resources/beta/beta.py @@ -52,10 +52,12 @@ def chatkit(self) -> ChatKit: @cached_property def assistants(self) -> Assistants: + """Build Assistants that can call models and use tools.""" return Assistants(self._client) @cached_property def threads(self) -> Threads: + """Build Assistants that can call models and use tools.""" return Threads(self._client) @cached_property @@ -93,10 +95,12 @@ def chatkit(self) -> AsyncChatKit: @cached_property def assistants(self) -> AsyncAssistants: + """Build Assistants that can call models and use tools.""" return AsyncAssistants(self._client) @cached_property def threads(self) -> AsyncThreads: + """Build Assistants that can call models and use tools.""" return AsyncThreads(self._client) @cached_property @@ -129,10 +133,12 @@ def chatkit(self) -> ChatKitWithRawResponse: @cached_property def assistants(self) -> AssistantsWithRawResponse: + """Build Assistants that can call models and use tools.""" return AssistantsWithRawResponse(self._beta.assistants) @cached_property def threads(self) -> ThreadsWithRawResponse: + """Build Assistants that can call models and use tools.""" return ThreadsWithRawResponse(self._beta.threads) @@ -146,10 +152,12 @@ def chatkit(self) -> AsyncChatKitWithRawResponse: @cached_property def assistants(self) -> AsyncAssistantsWithRawResponse: + """Build Assistants that can call models and use tools.""" return AsyncAssistantsWithRawResponse(self._beta.assistants) @cached_property def threads(self) -> AsyncThreadsWithRawResponse: + """Build Assistants that can call models and use tools.""" return AsyncThreadsWithRawResponse(self._beta.threads) @@ -163,10 +171,12 @@ def chatkit(self) -> ChatKitWithStreamingResponse: @cached_property def assistants(self) -> AssistantsWithStreamingResponse: + """Build Assistants that can call models and use tools.""" return AssistantsWithStreamingResponse(self._beta.assistants) @cached_property def threads(self) -> ThreadsWithStreamingResponse: + """Build Assistants that can call models and use tools.""" return ThreadsWithStreamingResponse(self._beta.threads) @@ -180,8 +190,10 @@ def chatkit(self) -> AsyncChatKitWithStreamingResponse: @cached_property def assistants(self) -> AsyncAssistantsWithStreamingResponse: + """Build Assistants that can call models and use tools.""" return AsyncAssistantsWithStreamingResponse(self._beta.assistants) @cached_property def threads(self) -> AsyncThreadsWithStreamingResponse: + """Build Assistants that can call models and use tools.""" return AsyncThreadsWithStreamingResponse(self._beta.threads) diff --git a/src/openai/resources/beta/threads/messages.py b/src/openai/resources/beta/threads/messages.py index d94ecca9a2..e783310933 100644 --- a/src/openai/resources/beta/threads/messages.py +++ b/src/openai/resources/beta/threads/messages.py @@ -29,6 +29,8 @@ class Messages(SyncAPIResource): + """Build Assistants that can call models and use tools.""" + @cached_property def with_raw_response(self) -> MessagesWithRawResponse: """ @@ -312,6 +314,8 @@ def delete( class AsyncMessages(AsyncAPIResource): + """Build Assistants that can call models and use tools.""" + @cached_property def with_raw_response(self) -> AsyncMessagesWithRawResponse: """ diff --git a/src/openai/resources/beta/threads/runs/runs.py b/src/openai/resources/beta/threads/runs/runs.py index 90845a2f62..20862185d2 100644 --- a/src/openai/resources/beta/threads/runs/runs.py +++ b/src/openai/resources/beta/threads/runs/runs.py @@ -59,8 +59,11 @@ class Runs(SyncAPIResource): + """Build Assistants that can call models and use tools.""" + @cached_property def steps(self) -> Steps: + """Build Assistants that can call models and use tools.""" return Steps(self._client) @cached_property @@ -1518,8 +1521,11 @@ def submit_tool_outputs_stream( class AsyncRuns(AsyncAPIResource): + """Build Assistants that can call models and use tools.""" + @cached_property def steps(self) -> AsyncSteps: + """Build Assistants that can call models and use tools.""" return AsyncSteps(self._client) @cached_property @@ -3015,6 +3021,7 @@ def __init__(self, runs: Runs) -> None: @cached_property def steps(self) -> StepsWithRawResponse: + """Build Assistants that can call models and use tools.""" return StepsWithRawResponse(self._runs.steps) @@ -3055,6 +3062,7 @@ def __init__(self, runs: AsyncRuns) -> None: @cached_property def steps(self) -> AsyncStepsWithRawResponse: + """Build Assistants that can call models and use tools.""" return AsyncStepsWithRawResponse(self._runs.steps) @@ -3095,6 +3103,7 @@ def __init__(self, runs: Runs) -> None: @cached_property def steps(self) -> StepsWithStreamingResponse: + """Build Assistants that can call models and use tools.""" return StepsWithStreamingResponse(self._runs.steps) @@ -3135,4 +3144,5 @@ def __init__(self, runs: AsyncRuns) -> None: @cached_property def steps(self) -> AsyncStepsWithStreamingResponse: + """Build Assistants that can call models and use tools.""" return AsyncStepsWithStreamingResponse(self._runs.steps) diff --git a/src/openai/resources/beta/threads/runs/steps.py b/src/openai/resources/beta/threads/runs/steps.py index 254a94435c..dea5df69bc 100644 --- a/src/openai/resources/beta/threads/runs/steps.py +++ b/src/openai/resources/beta/threads/runs/steps.py @@ -24,6 +24,8 @@ class Steps(SyncAPIResource): + """Build Assistants that can call models and use tools.""" + @cached_property def with_raw_response(self) -> StepsWithRawResponse: """ @@ -180,6 +182,8 @@ def list( class AsyncSteps(AsyncAPIResource): + """Build Assistants that can call models and use tools.""" + @cached_property def with_raw_response(self) -> AsyncStepsWithRawResponse: """ diff --git a/src/openai/resources/beta/threads/threads.py b/src/openai/resources/beta/threads/threads.py index a804fda159..0a93baf452 100644 --- a/src/openai/resources/beta/threads/threads.py +++ b/src/openai/resources/beta/threads/threads.py @@ -60,12 +60,16 @@ class Threads(SyncAPIResource): + """Build Assistants that can call models and use tools.""" + @cached_property def runs(self) -> Runs: + """Build Assistants that can call models and use tools.""" return Runs(self._client) @cached_property def messages(self) -> Messages: + """Build Assistants that can call models and use tools.""" return Messages(self._client) @cached_property @@ -922,12 +926,16 @@ def create_and_run_stream( class AsyncThreads(AsyncAPIResource): + """Build Assistants that can call models and use tools.""" + @cached_property def runs(self) -> AsyncRuns: + """Build Assistants that can call models and use tools.""" return AsyncRuns(self._client) @cached_property def messages(self) -> AsyncMessages: + """Build Assistants that can call models and use tools.""" return AsyncMessages(self._client) @cached_property @@ -1819,10 +1827,12 @@ def __init__(self, threads: Threads) -> None: @cached_property def runs(self) -> RunsWithRawResponse: + """Build Assistants that can call models and use tools.""" return RunsWithRawResponse(self._threads.runs) @cached_property def messages(self) -> MessagesWithRawResponse: + """Build Assistants that can call models and use tools.""" return MessagesWithRawResponse(self._threads.messages) @@ -1858,10 +1868,12 @@ def __init__(self, threads: AsyncThreads) -> None: @cached_property def runs(self) -> AsyncRunsWithRawResponse: + """Build Assistants that can call models and use tools.""" return AsyncRunsWithRawResponse(self._threads.runs) @cached_property def messages(self) -> AsyncMessagesWithRawResponse: + """Build Assistants that can call models and use tools.""" return AsyncMessagesWithRawResponse(self._threads.messages) @@ -1897,10 +1909,12 @@ def __init__(self, threads: Threads) -> None: @cached_property def runs(self) -> RunsWithStreamingResponse: + """Build Assistants that can call models and use tools.""" return RunsWithStreamingResponse(self._threads.runs) @cached_property def messages(self) -> MessagesWithStreamingResponse: + """Build Assistants that can call models and use tools.""" return MessagesWithStreamingResponse(self._threads.messages) @@ -1936,8 +1950,10 @@ def __init__(self, threads: AsyncThreads) -> None: @cached_property def runs(self) -> AsyncRunsWithStreamingResponse: + """Build Assistants that can call models and use tools.""" return AsyncRunsWithStreamingResponse(self._threads.runs) @cached_property def messages(self) -> AsyncMessagesWithStreamingResponse: + """Build Assistants that can call models and use tools.""" return AsyncMessagesWithStreamingResponse(self._threads.messages) diff --git a/src/openai/resources/chat/chat.py b/src/openai/resources/chat/chat.py index 14f9224b41..2c921e7480 100644 --- a/src/openai/resources/chat/chat.py +++ b/src/openai/resources/chat/chat.py @@ -19,6 +19,9 @@ class Chat(SyncAPIResource): @cached_property def completions(self) -> Completions: + """ + Given a list of messages comprising a conversation, the model will return a response. + """ return Completions(self._client) @cached_property @@ -44,6 +47,9 @@ def with_streaming_response(self) -> ChatWithStreamingResponse: class AsyncChat(AsyncAPIResource): @cached_property def completions(self) -> AsyncCompletions: + """ + Given a list of messages comprising a conversation, the model will return a response. + """ return AsyncCompletions(self._client) @cached_property @@ -72,6 +78,9 @@ def __init__(self, chat: Chat) -> None: @cached_property def completions(self) -> CompletionsWithRawResponse: + """ + Given a list of messages comprising a conversation, the model will return a response. + """ return CompletionsWithRawResponse(self._chat.completions) @@ -81,6 +90,9 @@ def __init__(self, chat: AsyncChat) -> None: @cached_property def completions(self) -> AsyncCompletionsWithRawResponse: + """ + Given a list of messages comprising a conversation, the model will return a response. + """ return AsyncCompletionsWithRawResponse(self._chat.completions) @@ -90,6 +102,9 @@ def __init__(self, chat: Chat) -> None: @cached_property def completions(self) -> CompletionsWithStreamingResponse: + """ + Given a list of messages comprising a conversation, the model will return a response. + """ return CompletionsWithStreamingResponse(self._chat.completions) @@ -99,4 +114,7 @@ def __init__(self, chat: AsyncChat) -> None: @cached_property def completions(self) -> AsyncCompletionsWithStreamingResponse: + """ + Given a list of messages comprising a conversation, the model will return a response. + """ return AsyncCompletionsWithStreamingResponse(self._chat.completions) diff --git a/src/openai/resources/chat/completions/completions.py b/src/openai/resources/chat/completions/completions.py index 5d56d05d87..a705c1f658 100644 --- a/src/openai/resources/chat/completions/completions.py +++ b/src/openai/resources/chat/completions/completions.py @@ -58,8 +58,15 @@ class Completions(SyncAPIResource): + """ + Given a list of messages comprising a conversation, the model will return a response. + """ + @cached_property def messages(self) -> Messages: + """ + Given a list of messages comprising a conversation, the model will return a response. + """ return Messages(self._client) @cached_property @@ -1554,8 +1561,15 @@ def stream( class AsyncCompletions(AsyncAPIResource): + """ + Given a list of messages comprising a conversation, the model will return a response. + """ + @cached_property def messages(self) -> AsyncMessages: + """ + Given a list of messages comprising a conversation, the model will return a response. + """ return AsyncMessages(self._client) @cached_property @@ -3075,6 +3089,9 @@ def __init__(self, completions: Completions) -> None: @cached_property def messages(self) -> MessagesWithRawResponse: + """ + Given a list of messages comprising a conversation, the model will return a response. + """ return MessagesWithRawResponse(self._completions.messages) @@ -3103,6 +3120,9 @@ def __init__(self, completions: AsyncCompletions) -> None: @cached_property def messages(self) -> AsyncMessagesWithRawResponse: + """ + Given a list of messages comprising a conversation, the model will return a response. + """ return AsyncMessagesWithRawResponse(self._completions.messages) @@ -3131,6 +3151,9 @@ def __init__(self, completions: Completions) -> None: @cached_property def messages(self) -> MessagesWithStreamingResponse: + """ + Given a list of messages comprising a conversation, the model will return a response. + """ return MessagesWithStreamingResponse(self._completions.messages) @@ -3159,6 +3182,9 @@ def __init__(self, completions: AsyncCompletions) -> None: @cached_property def messages(self) -> AsyncMessagesWithStreamingResponse: + """ + Given a list of messages comprising a conversation, the model will return a response. + """ return AsyncMessagesWithStreamingResponse(self._completions.messages) diff --git a/src/openai/resources/chat/completions/messages.py b/src/openai/resources/chat/completions/messages.py index 3d6dc79cd6..b1c6a08d51 100644 --- a/src/openai/resources/chat/completions/messages.py +++ b/src/openai/resources/chat/completions/messages.py @@ -21,6 +21,10 @@ class Messages(SyncAPIResource): + """ + Given a list of messages comprising a conversation, the model will return a response. + """ + @cached_property def with_raw_response(self) -> MessagesWithRawResponse: """ @@ -99,6 +103,10 @@ def list( class AsyncMessages(AsyncAPIResource): + """ + Given a list of messages comprising a conversation, the model will return a response. + """ + @cached_property def with_raw_response(self) -> AsyncMessagesWithRawResponse: """ diff --git a/src/openai/resources/completions.py b/src/openai/resources/completions.py index 4b6e29395b..4c9e266787 100644 --- a/src/openai/resources/completions.py +++ b/src/openai/resources/completions.py @@ -25,6 +25,10 @@ class Completions(SyncAPIResource): + """ + Given a prompt, the model will return one or more predicted completions, and can also return the probabilities of alternative tokens at each position. + """ + @cached_property def with_raw_response(self) -> CompletionsWithRawResponse: """ @@ -584,6 +588,10 @@ def create( class AsyncCompletions(AsyncAPIResource): + """ + Given a prompt, the model will return one or more predicted completions, and can also return the probabilities of alternative tokens at each position. + """ + @cached_property def with_raw_response(self) -> AsyncCompletionsWithRawResponse: """ diff --git a/src/openai/resources/conversations/conversations.py b/src/openai/resources/conversations/conversations.py index da037a4e22..f2c54e4d04 100644 --- a/src/openai/resources/conversations/conversations.py +++ b/src/openai/resources/conversations/conversations.py @@ -31,8 +31,11 @@ class Conversations(SyncAPIResource): + """Manage conversations and conversation items.""" + @cached_property def items(self) -> Items: + """Manage conversations and conversation items.""" return Items(self._client) @cached_property @@ -214,8 +217,11 @@ def delete( class AsyncConversations(AsyncAPIResource): + """Manage conversations and conversation items.""" + @cached_property def items(self) -> AsyncItems: + """Manage conversations and conversation items.""" return AsyncItems(self._client) @cached_property @@ -417,6 +423,7 @@ def __init__(self, conversations: Conversations) -> None: @cached_property def items(self) -> ItemsWithRawResponse: + """Manage conversations and conversation items.""" return ItemsWithRawResponse(self._conversations.items) @@ -439,6 +446,7 @@ def __init__(self, conversations: AsyncConversations) -> None: @cached_property def items(self) -> AsyncItemsWithRawResponse: + """Manage conversations and conversation items.""" return AsyncItemsWithRawResponse(self._conversations.items) @@ -461,6 +469,7 @@ def __init__(self, conversations: Conversations) -> None: @cached_property def items(self) -> ItemsWithStreamingResponse: + """Manage conversations and conversation items.""" return ItemsWithStreamingResponse(self._conversations.items) @@ -483,4 +492,5 @@ def __init__(self, conversations: AsyncConversations) -> None: @cached_property def items(self) -> AsyncItemsWithStreamingResponse: + """Manage conversations and conversation items.""" return AsyncItemsWithStreamingResponse(self._conversations.items) diff --git a/src/openai/resources/conversations/items.py b/src/openai/resources/conversations/items.py index 3dba144849..1f8e101f7f 100644 --- a/src/openai/resources/conversations/items.py +++ b/src/openai/resources/conversations/items.py @@ -26,6 +26,8 @@ class Items(SyncAPIResource): + """Manage conversations and conversation items.""" + @cached_property def with_raw_response(self) -> ItemsWithRawResponse: """ @@ -256,6 +258,8 @@ def delete( class AsyncItems(AsyncAPIResource): + """Manage conversations and conversation items.""" + @cached_property def with_raw_response(self) -> AsyncItemsWithRawResponse: """ diff --git a/src/openai/resources/embeddings.py b/src/openai/resources/embeddings.py index 5dc3dfa9b3..86eb949a40 100644 --- a/src/openai/resources/embeddings.py +++ b/src/openai/resources/embeddings.py @@ -25,6 +25,10 @@ class Embeddings(SyncAPIResource): + """ + Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms. + """ + @cached_property def with_raw_response(self) -> EmbeddingsWithRawResponse: """ @@ -144,6 +148,10 @@ def parser(obj: CreateEmbeddingResponse) -> CreateEmbeddingResponse: class AsyncEmbeddings(AsyncAPIResource): + """ + Get a vector representation of a given input that can be easily consumed by machine learning models and algorithms. + """ + @cached_property def with_raw_response(self) -> AsyncEmbeddingsWithRawResponse: """ diff --git a/src/openai/resources/evals/evals.py b/src/openai/resources/evals/evals.py index 40c4a3e9a3..f0fe28fe8c 100644 --- a/src/openai/resources/evals/evals.py +++ b/src/openai/resources/evals/evals.py @@ -35,8 +35,11 @@ class Evals(SyncAPIResource): + """Manage and run evals in the OpenAI platform.""" + @cached_property def runs(self) -> Runs: + """Manage and run evals in the OpenAI platform.""" return Runs(self._client) @cached_property @@ -299,8 +302,11 @@ def delete( class AsyncEvals(AsyncAPIResource): + """Manage and run evals in the OpenAI platform.""" + @cached_property def runs(self) -> AsyncRuns: + """Manage and run evals in the OpenAI platform.""" return AsyncRuns(self._client) @cached_property @@ -584,6 +590,7 @@ def __init__(self, evals: Evals) -> None: @cached_property def runs(self) -> RunsWithRawResponse: + """Manage and run evals in the OpenAI platform.""" return RunsWithRawResponse(self._evals.runs) @@ -609,6 +616,7 @@ def __init__(self, evals: AsyncEvals) -> None: @cached_property def runs(self) -> AsyncRunsWithRawResponse: + """Manage and run evals in the OpenAI platform.""" return AsyncRunsWithRawResponse(self._evals.runs) @@ -634,6 +642,7 @@ def __init__(self, evals: Evals) -> None: @cached_property def runs(self) -> RunsWithStreamingResponse: + """Manage and run evals in the OpenAI platform.""" return RunsWithStreamingResponse(self._evals.runs) @@ -659,4 +668,5 @@ def __init__(self, evals: AsyncEvals) -> None: @cached_property def runs(self) -> AsyncRunsWithStreamingResponse: + """Manage and run evals in the OpenAI platform.""" return AsyncRunsWithStreamingResponse(self._evals.runs) diff --git a/src/openai/resources/evals/runs/output_items.py b/src/openai/resources/evals/runs/output_items.py index c2dee72122..c2e6647715 100644 --- a/src/openai/resources/evals/runs/output_items.py +++ b/src/openai/resources/evals/runs/output_items.py @@ -22,6 +22,8 @@ class OutputItems(SyncAPIResource): + """Manage and run evals in the OpenAI platform.""" + @cached_property def with_raw_response(self) -> OutputItemsWithRawResponse: """ @@ -145,6 +147,8 @@ def list( class AsyncOutputItems(AsyncAPIResource): + """Manage and run evals in the OpenAI platform.""" + @cached_property def with_raw_response(self) -> AsyncOutputItemsWithRawResponse: """ diff --git a/src/openai/resources/evals/runs/runs.py b/src/openai/resources/evals/runs/runs.py index b747b198f8..49eecd768f 100644 --- a/src/openai/resources/evals/runs/runs.py +++ b/src/openai/resources/evals/runs/runs.py @@ -35,8 +35,11 @@ class Runs(SyncAPIResource): + """Manage and run evals in the OpenAI platform.""" + @cached_property def output_items(self) -> OutputItems: + """Manage and run evals in the OpenAI platform.""" return OutputItems(self._client) @cached_property @@ -285,8 +288,11 @@ def cancel( class AsyncRuns(AsyncAPIResource): + """Manage and run evals in the OpenAI platform.""" + @cached_property def output_items(self) -> AsyncOutputItems: + """Manage and run evals in the OpenAI platform.""" return AsyncOutputItems(self._client) @cached_property @@ -556,6 +562,7 @@ def __init__(self, runs: Runs) -> None: @cached_property def output_items(self) -> OutputItemsWithRawResponse: + """Manage and run evals in the OpenAI platform.""" return OutputItemsWithRawResponse(self._runs.output_items) @@ -581,6 +588,7 @@ def __init__(self, runs: AsyncRuns) -> None: @cached_property def output_items(self) -> AsyncOutputItemsWithRawResponse: + """Manage and run evals in the OpenAI platform.""" return AsyncOutputItemsWithRawResponse(self._runs.output_items) @@ -606,6 +614,7 @@ def __init__(self, runs: Runs) -> None: @cached_property def output_items(self) -> OutputItemsWithStreamingResponse: + """Manage and run evals in the OpenAI platform.""" return OutputItemsWithStreamingResponse(self._runs.output_items) @@ -631,4 +640,5 @@ def __init__(self, runs: AsyncRuns) -> None: @cached_property def output_items(self) -> AsyncOutputItemsWithStreamingResponse: + """Manage and run evals in the OpenAI platform.""" return AsyncOutputItemsWithStreamingResponse(self._runs.output_items) diff --git a/src/openai/resources/files.py b/src/openai/resources/files.py index 964d6505e7..7341b326dc 100644 --- a/src/openai/resources/files.py +++ b/src/openai/resources/files.py @@ -33,6 +33,10 @@ class Files(SyncAPIResource): + """ + Files are used to upload documents that can be used with features like Assistants and Fine-tuning. + """ + @cached_property def with_raw_response(self) -> FilesWithRawResponse: """ @@ -354,6 +358,10 @@ def wait_for_processing( class AsyncFiles(AsyncAPIResource): + """ + Files are used to upload documents that can be used with features like Assistants and Fine-tuning. + """ + @cached_property def with_raw_response(self) -> AsyncFilesWithRawResponse: """ diff --git a/src/openai/resources/fine_tuning/alpha/alpha.py b/src/openai/resources/fine_tuning/alpha/alpha.py index 54c05fab69..183208d0ab 100644 --- a/src/openai/resources/fine_tuning/alpha/alpha.py +++ b/src/openai/resources/fine_tuning/alpha/alpha.py @@ -19,6 +19,7 @@ class Alpha(SyncAPIResource): @cached_property def graders(self) -> Graders: + """Manage fine-tuning jobs to tailor a model to your specific training data.""" return Graders(self._client) @cached_property @@ -44,6 +45,7 @@ def with_streaming_response(self) -> AlphaWithStreamingResponse: class AsyncAlpha(AsyncAPIResource): @cached_property def graders(self) -> AsyncGraders: + """Manage fine-tuning jobs to tailor a model to your specific training data.""" return AsyncGraders(self._client) @cached_property @@ -72,6 +74,7 @@ def __init__(self, alpha: Alpha) -> None: @cached_property def graders(self) -> GradersWithRawResponse: + """Manage fine-tuning jobs to tailor a model to your specific training data.""" return GradersWithRawResponse(self._alpha.graders) @@ -81,6 +84,7 @@ def __init__(self, alpha: AsyncAlpha) -> None: @cached_property def graders(self) -> AsyncGradersWithRawResponse: + """Manage fine-tuning jobs to tailor a model to your specific training data.""" return AsyncGradersWithRawResponse(self._alpha.graders) @@ -90,6 +94,7 @@ def __init__(self, alpha: Alpha) -> None: @cached_property def graders(self) -> GradersWithStreamingResponse: + """Manage fine-tuning jobs to tailor a model to your specific training data.""" return GradersWithStreamingResponse(self._alpha.graders) @@ -99,4 +104,5 @@ def __init__(self, alpha: AsyncAlpha) -> None: @cached_property def graders(self) -> AsyncGradersWithStreamingResponse: + """Manage fine-tuning jobs to tailor a model to your specific training data.""" return AsyncGradersWithStreamingResponse(self._alpha.graders) diff --git a/src/openai/resources/fine_tuning/alpha/graders.py b/src/openai/resources/fine_tuning/alpha/graders.py index e7a9b925ea..e5d5dea5de 100644 --- a/src/openai/resources/fine_tuning/alpha/graders.py +++ b/src/openai/resources/fine_tuning/alpha/graders.py @@ -19,6 +19,8 @@ class Graders(SyncAPIResource): + """Manage fine-tuning jobs to tailor a model to your specific training data.""" + @cached_property def with_raw_response(self) -> GradersWithRawResponse: """ @@ -127,6 +129,8 @@ def validate( class AsyncGraders(AsyncAPIResource): + """Manage fine-tuning jobs to tailor a model to your specific training data.""" + @cached_property def with_raw_response(self) -> AsyncGradersWithRawResponse: """ diff --git a/src/openai/resources/fine_tuning/checkpoints/checkpoints.py b/src/openai/resources/fine_tuning/checkpoints/checkpoints.py index f59976a264..9c2ed6f576 100644 --- a/src/openai/resources/fine_tuning/checkpoints/checkpoints.py +++ b/src/openai/resources/fine_tuning/checkpoints/checkpoints.py @@ -19,6 +19,7 @@ class Checkpoints(SyncAPIResource): @cached_property def permissions(self) -> Permissions: + """Manage fine-tuning jobs to tailor a model to your specific training data.""" return Permissions(self._client) @cached_property @@ -44,6 +45,7 @@ def with_streaming_response(self) -> CheckpointsWithStreamingResponse: class AsyncCheckpoints(AsyncAPIResource): @cached_property def permissions(self) -> AsyncPermissions: + """Manage fine-tuning jobs to tailor a model to your specific training data.""" return AsyncPermissions(self._client) @cached_property @@ -72,6 +74,7 @@ def __init__(self, checkpoints: Checkpoints) -> None: @cached_property def permissions(self) -> PermissionsWithRawResponse: + """Manage fine-tuning jobs to tailor a model to your specific training data.""" return PermissionsWithRawResponse(self._checkpoints.permissions) @@ -81,6 +84,7 @@ def __init__(self, checkpoints: AsyncCheckpoints) -> None: @cached_property def permissions(self) -> AsyncPermissionsWithRawResponse: + """Manage fine-tuning jobs to tailor a model to your specific training data.""" return AsyncPermissionsWithRawResponse(self._checkpoints.permissions) @@ -90,6 +94,7 @@ def __init__(self, checkpoints: Checkpoints) -> None: @cached_property def permissions(self) -> PermissionsWithStreamingResponse: + """Manage fine-tuning jobs to tailor a model to your specific training data.""" return PermissionsWithStreamingResponse(self._checkpoints.permissions) @@ -99,4 +104,5 @@ def __init__(self, checkpoints: AsyncCheckpoints) -> None: @cached_property def permissions(self) -> AsyncPermissionsWithStreamingResponse: + """Manage fine-tuning jobs to tailor a model to your specific training data.""" return AsyncPermissionsWithStreamingResponse(self._checkpoints.permissions) diff --git a/src/openai/resources/fine_tuning/checkpoints/permissions.py b/src/openai/resources/fine_tuning/checkpoints/permissions.py index e7f55b82d9..2109ea0a4d 100644 --- a/src/openai/resources/fine_tuning/checkpoints/permissions.py +++ b/src/openai/resources/fine_tuning/checkpoints/permissions.py @@ -23,6 +23,8 @@ class Permissions(SyncAPIResource): + """Manage fine-tuning jobs to tailor a model to your specific training data.""" + @cached_property def with_raw_response(self) -> PermissionsWithRawResponse: """ @@ -191,6 +193,8 @@ def delete( class AsyncPermissions(AsyncAPIResource): + """Manage fine-tuning jobs to tailor a model to your specific training data.""" + @cached_property def with_raw_response(self) -> AsyncPermissionsWithRawResponse: """ diff --git a/src/openai/resources/fine_tuning/fine_tuning.py b/src/openai/resources/fine_tuning/fine_tuning.py index 25ae3e8cf4..60f1f44bdc 100644 --- a/src/openai/resources/fine_tuning/fine_tuning.py +++ b/src/openai/resources/fine_tuning/fine_tuning.py @@ -35,6 +35,7 @@ class FineTuning(SyncAPIResource): @cached_property def jobs(self) -> Jobs: + """Manage fine-tuning jobs to tailor a model to your specific training data.""" return Jobs(self._client) @cached_property @@ -68,6 +69,7 @@ def with_streaming_response(self) -> FineTuningWithStreamingResponse: class AsyncFineTuning(AsyncAPIResource): @cached_property def jobs(self) -> AsyncJobs: + """Manage fine-tuning jobs to tailor a model to your specific training data.""" return AsyncJobs(self._client) @cached_property @@ -104,6 +106,7 @@ def __init__(self, fine_tuning: FineTuning) -> None: @cached_property def jobs(self) -> JobsWithRawResponse: + """Manage fine-tuning jobs to tailor a model to your specific training data.""" return JobsWithRawResponse(self._fine_tuning.jobs) @cached_property @@ -121,6 +124,7 @@ def __init__(self, fine_tuning: AsyncFineTuning) -> None: @cached_property def jobs(self) -> AsyncJobsWithRawResponse: + """Manage fine-tuning jobs to tailor a model to your specific training data.""" return AsyncJobsWithRawResponse(self._fine_tuning.jobs) @cached_property @@ -138,6 +142,7 @@ def __init__(self, fine_tuning: FineTuning) -> None: @cached_property def jobs(self) -> JobsWithStreamingResponse: + """Manage fine-tuning jobs to tailor a model to your specific training data.""" return JobsWithStreamingResponse(self._fine_tuning.jobs) @cached_property @@ -155,6 +160,7 @@ def __init__(self, fine_tuning: AsyncFineTuning) -> None: @cached_property def jobs(self) -> AsyncJobsWithStreamingResponse: + """Manage fine-tuning jobs to tailor a model to your specific training data.""" return AsyncJobsWithStreamingResponse(self._fine_tuning.jobs) @cached_property diff --git a/src/openai/resources/fine_tuning/jobs/checkpoints.py b/src/openai/resources/fine_tuning/jobs/checkpoints.py index f65856f0c6..6f14a0994e 100644 --- a/src/openai/resources/fine_tuning/jobs/checkpoints.py +++ b/src/openai/resources/fine_tuning/jobs/checkpoints.py @@ -22,6 +22,8 @@ class Checkpoints(SyncAPIResource): + """Manage fine-tuning jobs to tailor a model to your specific training data.""" + @cached_property def with_raw_response(self) -> CheckpointsWithRawResponse: """ @@ -93,6 +95,8 @@ def list( class AsyncCheckpoints(AsyncAPIResource): + """Manage fine-tuning jobs to tailor a model to your specific training data.""" + @cached_property def with_raw_response(self) -> AsyncCheckpointsWithRawResponse: """ diff --git a/src/openai/resources/fine_tuning/jobs/jobs.py b/src/openai/resources/fine_tuning/jobs/jobs.py index b292e057cf..e38baa5539 100644 --- a/src/openai/resources/fine_tuning/jobs/jobs.py +++ b/src/openai/resources/fine_tuning/jobs/jobs.py @@ -35,8 +35,11 @@ class Jobs(SyncAPIResource): + """Manage fine-tuning jobs to tailor a model to your specific training data.""" + @cached_property def checkpoints(self) -> Checkpoints: + """Manage fine-tuning jobs to tailor a model to your specific training data.""" return Checkpoints(self._client) @cached_property @@ -415,8 +418,11 @@ def resume( class AsyncJobs(AsyncAPIResource): + """Manage fine-tuning jobs to tailor a model to your specific training data.""" + @cached_property def checkpoints(self) -> AsyncCheckpoints: + """Manage fine-tuning jobs to tailor a model to your specific training data.""" return AsyncCheckpoints(self._client) @cached_property @@ -822,6 +828,7 @@ def __init__(self, jobs: Jobs) -> None: @cached_property def checkpoints(self) -> CheckpointsWithRawResponse: + """Manage fine-tuning jobs to tailor a model to your specific training data.""" return CheckpointsWithRawResponse(self._jobs.checkpoints) @@ -853,6 +860,7 @@ def __init__(self, jobs: AsyncJobs) -> None: @cached_property def checkpoints(self) -> AsyncCheckpointsWithRawResponse: + """Manage fine-tuning jobs to tailor a model to your specific training data.""" return AsyncCheckpointsWithRawResponse(self._jobs.checkpoints) @@ -884,6 +892,7 @@ def __init__(self, jobs: Jobs) -> None: @cached_property def checkpoints(self) -> CheckpointsWithStreamingResponse: + """Manage fine-tuning jobs to tailor a model to your specific training data.""" return CheckpointsWithStreamingResponse(self._jobs.checkpoints) @@ -915,4 +924,5 @@ def __init__(self, jobs: AsyncJobs) -> None: @cached_property def checkpoints(self) -> AsyncCheckpointsWithStreamingResponse: + """Manage fine-tuning jobs to tailor a model to your specific training data.""" return AsyncCheckpointsWithStreamingResponse(self._jobs.checkpoints) diff --git a/src/openai/resources/images.py b/src/openai/resources/images.py index 647eb1ca24..6959c2aeff 100644 --- a/src/openai/resources/images.py +++ b/src/openai/resources/images.py @@ -25,6 +25,8 @@ class Images(SyncAPIResource): + """Given a prompt and/or an input image, the model will generate a new image.""" + @cached_property def with_raw_response(self) -> ImagesWithRawResponse: """ @@ -915,6 +917,8 @@ def generate( class AsyncImages(AsyncAPIResource): + """Given a prompt and/or an input image, the model will generate a new image.""" + @cached_property def with_raw_response(self) -> AsyncImagesWithRawResponse: """ diff --git a/src/openai/resources/models.py b/src/openai/resources/models.py index a8f7691055..508393263f 100644 --- a/src/openai/resources/models.py +++ b/src/openai/resources/models.py @@ -21,6 +21,8 @@ class Models(SyncAPIResource): + """List and describe the various models available in the API.""" + @cached_property def with_raw_response(self) -> ModelsWithRawResponse: """ @@ -134,6 +136,8 @@ def delete( class AsyncModels(AsyncAPIResource): + """List and describe the various models available in the API.""" + @cached_property def with_raw_response(self) -> AsyncModelsWithRawResponse: """ diff --git a/src/openai/resources/moderations.py b/src/openai/resources/moderations.py index 5f378f71e7..0b9a2d23c7 100644 --- a/src/openai/resources/moderations.py +++ b/src/openai/resources/moderations.py @@ -22,6 +22,10 @@ class Moderations(SyncAPIResource): + """ + Given text and/or image inputs, classifies if those inputs are potentially harmful. + """ + @cached_property def with_raw_response(self) -> ModerationsWithRawResponse: """ @@ -92,6 +96,10 @@ def create( class AsyncModerations(AsyncAPIResource): + """ + Given text and/or image inputs, classifies if those inputs are potentially harmful. + """ + @cached_property def with_raw_response(self) -> AsyncModerationsWithRawResponse: """ diff --git a/src/openai/resources/uploads/parts.py b/src/openai/resources/uploads/parts.py index 73eabd4083..034547f308 100644 --- a/src/openai/resources/uploads/parts.py +++ b/src/openai/resources/uploads/parts.py @@ -20,6 +20,8 @@ class Parts(SyncAPIResource): + """Use Uploads to upload large files in multiple parts.""" + @cached_property def with_raw_response(self) -> PartsWithRawResponse: """ @@ -95,6 +97,8 @@ def create( class AsyncParts(AsyncAPIResource): + """Use Uploads to upload large files in multiple parts.""" + @cached_property def with_raw_response(self) -> AsyncPartsWithRawResponse: """ diff --git a/src/openai/resources/uploads/uploads.py b/src/openai/resources/uploads/uploads.py index 2873b913ba..f5e5e6f664 100644 --- a/src/openai/resources/uploads/uploads.py +++ b/src/openai/resources/uploads/uploads.py @@ -41,8 +41,11 @@ class Uploads(SyncAPIResource): + """Use Uploads to upload large files in multiple parts.""" + @cached_property def parts(self) -> Parts: + """Use Uploads to upload large files in multiple parts.""" return Parts(self._client) @cached_property @@ -343,8 +346,11 @@ def complete( class AsyncUploads(AsyncAPIResource): + """Use Uploads to upload large files in multiple parts.""" + @cached_property def parts(self) -> AsyncParts: + """Use Uploads to upload large files in multiple parts.""" return AsyncParts(self._client) @cached_property @@ -671,6 +677,7 @@ def __init__(self, uploads: Uploads) -> None: @cached_property def parts(self) -> PartsWithRawResponse: + """Use Uploads to upload large files in multiple parts.""" return PartsWithRawResponse(self._uploads.parts) @@ -690,6 +697,7 @@ def __init__(self, uploads: AsyncUploads) -> None: @cached_property def parts(self) -> AsyncPartsWithRawResponse: + """Use Uploads to upload large files in multiple parts.""" return AsyncPartsWithRawResponse(self._uploads.parts) @@ -709,6 +717,7 @@ def __init__(self, uploads: Uploads) -> None: @cached_property def parts(self) -> PartsWithStreamingResponse: + """Use Uploads to upload large files in multiple parts.""" return PartsWithStreamingResponse(self._uploads.parts) @@ -728,4 +737,5 @@ def __init__(self, uploads: AsyncUploads) -> None: @cached_property def parts(self) -> AsyncPartsWithStreamingResponse: + """Use Uploads to upload large files in multiple parts.""" return AsyncPartsWithStreamingResponse(self._uploads.parts) From 4b813b9ad4d342ae9751d3060769d19cf63f3e54 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Mar 2026 05:19:33 +0000 Subject: [PATCH 7/7] release: 2.25.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 20 ++++++++++++++++++++ pyproject.toml | 2 +- src/openai/_version.py | 2 +- 4 files changed, 23 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 288087c17b..c5fe8ab6d6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.24.0" + ".": "2.25.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 91da3fc859..bda87070d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # Changelog +## 2.25.0 (2026-03-04) + +Full Changelog: [v2.24.0...v2.25.0](https://github.com/openai/openai-python/compare/v2.24.0...v2.25.0) + +### Features + +* **api:** remove prompt_cache_key param from responses, phase field from message types ([44fb382](https://github.com/openai/openai-python/commit/44fb382698872d98d5f72c880b47846c7b594f4f)) + + +### Bug Fixes + +* **api:** internal schema fixes ([0c0f970](https://github.com/openai/openai-python/commit/0c0f970cbd164131bf06f7ab38f170bbcb323683)) +* **api:** manual updates ([9fc323f](https://github.com/openai/openai-python/commit/9fc323f4da6cfca9de194e12c1486a3cd1bfa4b5)) +* **api:** readd phase ([1b27b5a](https://github.com/openai/openai-python/commit/1b27b5a834f5cb75f80c597259d0df0352ba83bd)) + + +### Chores + +* **internal:** codegen related update ([b1de941](https://github.com/openai/openai-python/commit/b1de9419a68fd6fb97a63f415fb3d1e5851582cb)) + ## 2.24.0 (2026-02-24) Full Changelog: [v2.23.0...v2.24.0](https://github.com/openai/openai-python/compare/v2.23.0...v2.24.0) diff --git a/pyproject.toml b/pyproject.toml index 49ab3668e8..f7aae6cbdb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "openai" -version = "2.24.0" +version = "2.25.0" 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 08cf29390a..417b40c283 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__ = "2.24.0" # x-release-please-version +__version__ = "2.25.0" # x-release-please-version