Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "1.107.3"
".": "1.108.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 118
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-d30ff992a48873c1466c49f3c01f2ec8933faebff23424748f8d056065b1bcef.yml
openapi_spec_hash: e933ec43b46f45c348adb78840e5808d
config_hash: bf45940f0a7805b4ec2017eecdd36893
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-380330a93b5d010391ca3b36ea193c5353b0dfdf2ddd02789ef84a84ce427e82.yml
openapi_spec_hash: 859703234259ecdd2a3c6f4de88eb504
config_hash: b619b45c1e7facf819f902dee8fa4f97
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## 1.108.0 (2025-09-17)

Full Changelog: [v1.107.3...v1.108.0](https://github.com/openai/openai-python/compare/v1.107.3...v1.108.0)

### Features

* **api:** type updates for conversations, reasoning_effort and results for evals ([c2ee28c](https://github.com/openai/openai-python/commit/c2ee28c1b77eed98766fbb01cf1ad2ee240f412e))


### Chores

* **internal:** update pydantic dependency ([369d10a](https://github.com/openai/openai-python/commit/369d10a40dfe744f6bfc10c99eb1f58176500120))

## 1.107.3 (2025-09-15)

Full Changelog: [v1.107.2...v1.107.3](https://github.com/openai/openai-python/compare/v1.107.2...v1.107.3)
Expand Down
15 changes: 5 additions & 10 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -991,22 +991,17 @@ Types:
```python
from openai.types.conversations import (
ComputerScreenshotContent,
ContainerFileCitationBody,
Conversation,
ConversationDeleted,
ConversationDeletedResource,
FileCitationBody,
InputFileContent,
InputImageContent,
InputTextContent,
LobProb,
Message,
OutputTextContent,
RefusalContent,
SummaryTextContent,
TextContent,
TopLogProb,
URLCitationBody,
InputTextContent,
OutputTextContent,
RefusalContent,
InputImageContent,
InputFileContent,
)
```

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "openai"
version = "1.107.3"
version = "1.108.0"
description = "The official Python library for the openai API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
10 changes: 7 additions & 3 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ multidict==6.5.0
mypy==1.14.1
mypy-extensions==1.0.0
# via mypy
nest-asyncio==1.6.0
nodeenv==1.8.0
# via pyright
nox==2023.4.22
Expand All @@ -133,11 +134,11 @@ portalocker==2.10.1
propcache==0.3.2
# via aiohttp
# via yarl
pycparser==2.22
pycparser==2.23
# via cffi
pydantic==2.10.3
pydantic==2.11.9
# via openai
pydantic-core==2.27.1
pydantic-core==2.33.2
# via pydantic
pygments==2.18.0
# via pytest
Expand Down Expand Up @@ -199,6 +200,9 @@ typing-extensions==4.12.2
# via pydantic
# via pydantic-core
# via pyright
# via typing-inspection
typing-inspection==0.4.1
# via pydantic
tzdata==2024.1
# via pandas
urllib3==2.2.1
Expand Down
11 changes: 7 additions & 4 deletions requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ pandas-stubs==2.2.2.240807
propcache==0.3.2
# via aiohttp
# via yarl
pycparser==2.22
pycparser==2.23
# via cffi
pydantic==2.10.3
pydantic==2.11.9
# via openai
pydantic-core==2.27.1
pydantic-core==2.33.2
# via pydantic
python-dateutil==2.9.0.post0
# via pandas
Expand All @@ -93,7 +93,10 @@ typing-extensions==4.12.2
# via openai
# via pydantic
# via pydantic-core
tzdata==2024.1
# via typing-inspection
typing-inspection==0.4.1
# via pydantic
tzdata==2025.2
# via pandas
websockets==15.0.1
# via openai
Expand Down
14 changes: 10 additions & 4 deletions src/openai/_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,14 +281,15 @@ def model_dump(
mode: Literal["json", "python"] | str = "python",
include: IncEx | None = None,
exclude: IncEx | None = None,
by_alias: bool = False,
by_alias: bool | None = None,
exclude_unset: bool = False,
exclude_defaults: bool = False,
exclude_none: bool = False,
round_trip: bool = False,
warnings: bool | Literal["none", "warn", "error"] = True,
context: dict[str, Any] | None = None,
serialize_as_any: bool = False,
fallback: Callable[[Any], Any] | None = None,
) -> dict[str, Any]:
"""Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump

Expand Down Expand Up @@ -320,10 +321,12 @@ def model_dump(
raise ValueError("context is only supported in Pydantic v2")
if serialize_as_any != False:
raise ValueError("serialize_as_any is only supported in Pydantic v2")
if fallback is not None:
raise ValueError("fallback is only supported in Pydantic v2")
dumped = super().dict( # pyright: ignore[reportDeprecated]
include=include,
exclude=exclude,
by_alias=by_alias,
by_alias=by_alias if by_alias is not None else False,
exclude_unset=exclude_unset,
exclude_defaults=exclude_defaults,
exclude_none=exclude_none,
Expand All @@ -338,13 +341,14 @@ def model_dump_json(
indent: int | None = None,
include: IncEx | None = None,
exclude: IncEx | None = None,
by_alias: bool = False,
by_alias: bool | None = None,
exclude_unset: bool = False,
exclude_defaults: bool = False,
exclude_none: bool = False,
round_trip: bool = False,
warnings: bool | Literal["none", "warn", "error"] = True,
context: dict[str, Any] | None = None,
fallback: Callable[[Any], Any] | None = None,
serialize_as_any: bool = False,
) -> str:
"""Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump_json
Expand Down Expand Up @@ -373,11 +377,13 @@ def model_dump_json(
raise ValueError("context is only supported in Pydantic v2")
if serialize_as_any != False:
raise ValueError("serialize_as_any is only supported in Pydantic v2")
if fallback is not None:
raise ValueError("fallback is only supported in Pydantic v2")
return super().json( # type: ignore[reportDeprecated]
indent=indent,
include=include,
exclude=exclude,
by_alias=by_alias,
by_alias=by_alias if by_alias is not None else False,
exclude_unset=exclude_unset,
exclude_defaults=exclude_defaults,
exclude_none=exclude_none,
Expand Down
2 changes: 1 addition & 1 deletion src/openai/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "openai"
__version__ = "1.107.3" # x-release-please-version
__version__ = "1.108.0" # x-release-please-version
10 changes: 5 additions & 5 deletions src/openai/types/conversations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,25 @@
from __future__ import annotations

from .message import Message as Message
from .lob_prob import LobProb as LobProb
from .conversation import Conversation as Conversation
from .text_content import TextContent as TextContent
from .top_log_prob import TopLogProb as TopLogProb
from .refusal_content import RefusalContent as RefusalContent
from .item_list_params import ItemListParams as ItemListParams
from .conversation_item import ConversationItem as ConversationItem
from .url_citation_body import URLCitationBody as URLCitationBody
from .file_citation_body import FileCitationBody as FileCitationBody
from .input_file_content import InputFileContent as InputFileContent
from .input_text_content import InputTextContent as InputTextContent
from .item_create_params import ItemCreateParams as ItemCreateParams
from .input_image_content import InputImageContent as InputImageContent
from .output_text_content import OutputTextContent as OutputTextContent
from .item_retrieve_params import ItemRetrieveParams as ItemRetrieveParams
from .summary_text_content import SummaryTextContent as SummaryTextContent
from .refusal_content_param import RefusalContentParam as RefusalContentParam
from .conversation_item_list import ConversationItemList as ConversationItemList
from .input_file_content_param import InputFileContentParam as InputFileContentParam
from .input_text_content_param import InputTextContentParam as InputTextContentParam
from .input_image_content_param import InputImageContentParam as InputImageContentParam
from .output_text_content_param import OutputTextContentParam as OutputTextContentParam
from .conversation_create_params import ConversationCreateParams as ConversationCreateParams
from .conversation_update_params import ConversationUpdateParams as ConversationUpdateParams
from .computer_screenshot_content import ComputerScreenshotContent as ComputerScreenshotContent
from .container_file_citation_body import ContainerFileCitationBody as ContainerFileCitationBody
from .conversation_deleted_resource import ConversationDeletedResource as ConversationDeletedResource
27 changes: 0 additions & 27 deletions src/openai/types/conversations/container_file_citation_body.py

This file was deleted.

21 changes: 0 additions & 21 deletions src/openai/types/conversations/file_citation_body.py

This file was deleted.

19 changes: 2 additions & 17 deletions src/openai/types/conversations/input_file_content.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Optional
from typing_extensions import Literal

from ..._models import BaseModel
from ..responses.response_input_file import ResponseInputFile

__all__ = ["InputFileContent"]


class InputFileContent(BaseModel):
file_id: Optional[str] = None
"""The ID of the file to be sent to the model."""

type: Literal["input_file"]
"""The type of the input item. Always `input_file`."""

file_url: Optional[str] = None
"""The URL of the file to be sent to the model."""

filename: Optional[str] = None
"""The name of the file to be sent to the model."""
InputFileContent = ResponseInputFile
7 changes: 7 additions & 0 deletions src/openai/types/conversations/input_file_content_param.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from ..responses.response_input_file_param import ResponseInputFileParam

InputFileContentParam = ResponseInputFileParam
25 changes: 2 additions & 23 deletions src/openai/types/conversations/input_image_content.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import Optional
from typing_extensions import Literal

from ..._models import BaseModel
from ..responses.response_input_image import ResponseInputImage

__all__ = ["InputImageContent"]


class InputImageContent(BaseModel):
detail: Literal["low", "high", "auto"]
"""The detail level of the image to be sent to the model.

One of `high`, `low`, or `auto`. Defaults to `auto`.
"""

file_id: Optional[str] = None
"""The ID of the file to be sent to the model."""

image_url: Optional[str] = None
"""The URL of the image to be sent to the model.

A fully qualified URL or base64 encoded image in a data URL.
"""

type: Literal["input_image"]
"""The type of the input item. Always `input_image`."""
InputImageContent = ResponseInputImage
7 changes: 7 additions & 0 deletions src/openai/types/conversations/input_image_content_param.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from ..responses.response_input_image_param import ResponseInputImageParam

InputImageContentParam = ResponseInputImageParam
12 changes: 2 additions & 10 deletions src/openai/types/conversations/input_text_content.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing_extensions import Literal

from ..._models import BaseModel
from ..responses.response_input_text import ResponseInputText

__all__ = ["InputTextContent"]


class InputTextContent(BaseModel):
text: str
"""The text input to the model."""

type: Literal["input_text"]
"""The type of the input item. Always `input_text`."""
InputTextContent = ResponseInputText
7 changes: 7 additions & 0 deletions src/openai/types/conversations/input_text_content_param.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from ..responses.response_input_text_param import ResponseInputTextParam

InputTextContentParam = ResponseInputTextParam
18 changes: 0 additions & 18 deletions src/openai/types/conversations/lob_prob.py

This file was deleted.

Loading
Loading