Commit d296d858
Changed files (7)
src/openai/types/conversations/message.py
@@ -14,7 +14,16 @@ from ..responses.response_input_image import ResponseInputImage
from ..responses.response_output_text import ResponseOutputText
from ..responses.response_output_refusal import ResponseOutputRefusal
-__all__ = ["Message", "Content"]
+__all__ = ["Message", "Content", "ContentReasoningText"]
+
+
+class ContentReasoningText(BaseModel):
+ text: str
+ """The reasoning text from the model."""
+
+ type: Literal["reasoning_text"]
+ """The type of the reasoning text. Always `reasoning_text`."""
+
Content: TypeAlias = Annotated[
Union[
@@ -22,6 +31,7 @@ Content: TypeAlias = Annotated[
ResponseOutputText,
TextContent,
SummaryTextContent,
+ ContentReasoningText,
ResponseOutputRefusal,
ResponseInputImage,
ComputerScreenshotContent,
src/openai/types/conversations/summary_text_content.py
@@ -9,5 +9,7 @@ __all__ = ["SummaryTextContent"]
class SummaryTextContent(BaseModel):
text: str
+ """A summary of the reasoning output from the model so far."""
type: Literal["summary_text"]
+ """The type of the object. Always `summary_text`."""
src/openai/types/responses/response_content_part_added_event.py
@@ -8,9 +8,20 @@ from ..._models import BaseModel
from .response_output_text import ResponseOutputText
from .response_output_refusal import ResponseOutputRefusal
-__all__ = ["ResponseContentPartAddedEvent", "Part"]
+__all__ = ["ResponseContentPartAddedEvent", "Part", "PartReasoningText"]
-Part: TypeAlias = Annotated[Union[ResponseOutputText, ResponseOutputRefusal], PropertyInfo(discriminator="type")]
+
+class PartReasoningText(BaseModel):
+ text: str
+ """The reasoning text from the model."""
+
+ type: Literal["reasoning_text"]
+ """The type of the reasoning text. Always `reasoning_text`."""
+
+
+Part: TypeAlias = Annotated[
+ Union[ResponseOutputText, ResponseOutputRefusal, PartReasoningText], PropertyInfo(discriminator="type")
+]
class ResponseContentPartAddedEvent(BaseModel):
src/openai/types/responses/response_content_part_done_event.py
@@ -8,9 +8,20 @@ from ..._models import BaseModel
from .response_output_text import ResponseOutputText
from .response_output_refusal import ResponseOutputRefusal
-__all__ = ["ResponseContentPartDoneEvent", "Part"]
+__all__ = ["ResponseContentPartDoneEvent", "Part", "PartReasoningText"]
-Part: TypeAlias = Annotated[Union[ResponseOutputText, ResponseOutputRefusal], PropertyInfo(discriminator="type")]
+
+class PartReasoningText(BaseModel):
+ text: str
+ """The reasoning text from the model."""
+
+ type: Literal["reasoning_text"]
+ """The type of the reasoning text. Always `reasoning_text`."""
+
+
+Part: TypeAlias = Annotated[
+ Union[ResponseOutputText, ResponseOutputRefusal, PartReasoningText], PropertyInfo(discriminator="type")
+]
class ResponseContentPartDoneEvent(BaseModel):
src/openai/types/responses/response_reasoning_item.py
@@ -18,10 +18,10 @@ class Summary(BaseModel):
class Content(BaseModel):
text: str
- """Reasoning text output from the model."""
+ """The reasoning text from the model."""
type: Literal["reasoning_text"]
- """The type of the object. Always `reasoning_text`."""
+ """The type of the reasoning text. Always `reasoning_text`."""
class ResponseReasoningItem(BaseModel):
src/openai/types/responses/response_reasoning_item_param.py
@@ -18,10 +18,10 @@ class Summary(TypedDict, total=False):
class Content(TypedDict, total=False):
text: Required[str]
- """Reasoning text output from the model."""
+ """The reasoning text from the model."""
type: Required[Literal["reasoning_text"]]
- """The type of the object. Always `reasoning_text`."""
+ """The type of the reasoning text. Always `reasoning_text`."""
class ResponseReasoningItemParam(TypedDict, total=False):
.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 118
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-380330a93b5d010391ca3b36ea193c5353b0dfdf2ddd02789ef84a84ce427e82.yml
-openapi_spec_hash: 859703234259ecdd2a3c6f4de88eb504
-config_hash: b619b45c1e7facf819f902dee8fa4f97
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-ea23db36b0899cc715f56d0098956069b2d92880f448adff3a4ac1bb53cb2cec.yml
+openapi_spec_hash: 36f76ea31297c9593bcfae453f6255cc
+config_hash: 666d6bb4b564f0d9d431124b5d1a0665