Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: openai/openai-python
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.23.1
Choose a base ref
...
head repository: openai/openai-python
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.23.2
Choose a head ref
  • 2 commits
  • 12 files changed
  • 1 contributor

Commits on Apr 19, 2024

  1. Verified

    This commit was signed with the committer’s verified signature.
    baywet Vincent Biret
    Copy the full SHA
    f73996b View commit details
  2. release: 1.23.2

    stainless-bot committed Apr 19, 2024

    Verified

    This commit was signed with the committer’s verified signature.
    baywet Vincent Biret
    Copy the full SHA
    c117779 View commit details
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.23.1"
".": "1.23.2"
}
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 1.23.2 (2024-04-19)

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

### Bug Fixes

* **api:** correct types for message attachment tools ([#1348](https://github.com/openai/openai-python/issues/1348)) ([78a6261](https://github.com/openai/openai-python/commit/78a6261eaad7839284903287d4f647d9cb4ced0b))

## 1.23.1 (2024-04-18)

Full Changelog: [v1.23.0...v1.23.1](https://github.com/openai/openai-python/compare/v1.23.0...v1.23.1)
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.23.1"
version = "1.23.2"
description = "The official Python library for the openai API"
dynamic = ["readme"]
license = "Apache-2.0"
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.23.1" # x-release-please-version
__version__ = "1.23.2" # x-release-please-version
7 changes: 6 additions & 1 deletion src/openai/types/beta/thread_create_and_run_params.py
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@
"Thread",
"ThreadMessage",
"ThreadMessageAttachment",
"ThreadMessageAttachmentTool",
"ThreadToolResources",
"ThreadToolResourcesCodeInterpreter",
"ThreadToolResourcesFileSearch",
@@ -170,11 +171,15 @@ class ThreadCreateAndRunParamsBase(TypedDict, total=False):
"""


ThreadMessageAttachmentTool = Union[CodeInterpreterToolParam, FileSearchToolParam]


class ThreadMessageAttachment(TypedDict, total=False):
file_id: str
"""The ID of the file to attach to the message."""

tools: List[Literal["file_search", "code_interpreter"]]
tools: Iterable[ThreadMessageAttachmentTool]
"""The tools to add this file to."""


class ThreadMessage(TypedDict, total=False):
12 changes: 10 additions & 2 deletions src/openai/types/beta/thread_create_params.py
Original file line number Diff line number Diff line change
@@ -2,13 +2,17 @@

from __future__ import annotations

from typing import List, Iterable, Optional
from typing import List, Union, Iterable, Optional
from typing_extensions import Literal, Required, TypedDict

from .file_search_tool_param import FileSearchToolParam
from .code_interpreter_tool_param import CodeInterpreterToolParam

__all__ = [
"ThreadCreateParams",
"Message",
"MessageAttachment",
"MessageAttachmentTool",
"ToolResources",
"ToolResourcesCodeInterpreter",
"ToolResourcesFileSearch",
@@ -40,11 +44,15 @@ class ThreadCreateParams(TypedDict, total=False):
"""


MessageAttachmentTool = Union[CodeInterpreterToolParam, FileSearchToolParam]


class MessageAttachment(TypedDict, total=False):
file_id: str
"""The ID of the file to attach to the message."""

tools: List[Literal["file_search", "code_interpreter"]]
tools: Iterable[MessageAttachmentTool]
"""The tools to add this file to."""


class Message(TypedDict, total=False):
11 changes: 8 additions & 3 deletions src/openai/types/beta/threads/message.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,24 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from typing import List, Optional
from typing import List, Union, Optional
from typing_extensions import Literal

from ...._models import BaseModel
from .message_content import MessageContent
from ..file_search_tool import FileSearchTool
from ..code_interpreter_tool import CodeInterpreterTool

__all__ = ["Message", "Attachment", "IncompleteDetails"]
__all__ = ["Message", "Attachment", "AttachmentTool", "IncompleteDetails"]

AttachmentTool = Union[CodeInterpreterTool, FileSearchTool]


class Attachment(BaseModel):
file_id: Optional[str] = None
"""The ID of the file to attach to the message."""

tools: Optional[List[Literal["file_search", "code_interpreter"]]] = None
tools: Optional[List[AttachmentTool]] = None
"""The tools to add this file to."""


class IncompleteDetails(BaseModel):
13 changes: 10 additions & 3 deletions src/openai/types/beta/threads/message_create_params.py
Original file line number Diff line number Diff line change
@@ -2,10 +2,13 @@

from __future__ import annotations

from typing import List, Iterable, Optional
from typing import Union, Iterable, Optional
from typing_extensions import Literal, Required, TypedDict

__all__ = ["MessageCreateParams", "Attachment"]
from ..file_search_tool_param import FileSearchToolParam
from ..code_interpreter_tool_param import CodeInterpreterToolParam

__all__ = ["MessageCreateParams", "Attachment", "AttachmentTool"]


class MessageCreateParams(TypedDict, total=False):
@@ -33,8 +36,12 @@ class MessageCreateParams(TypedDict, total=False):
"""


AttachmentTool = Union[CodeInterpreterToolParam, FileSearchToolParam]


class Attachment(TypedDict, total=False):
file_id: str
"""The ID of the file to attach to the message."""

tools: List[Literal["file_search", "code_interpreter"]]
tools: Iterable[AttachmentTool]
"""The tools to add this file to."""
11 changes: 9 additions & 2 deletions src/openai/types/beta/threads/run_create_params.py
Original file line number Diff line number Diff line change
@@ -2,17 +2,20 @@

from __future__ import annotations

from typing import List, Union, Iterable, Optional
from typing import Union, Iterable, Optional
from typing_extensions import Literal, Required, TypedDict

from ..assistant_tool_param import AssistantToolParam
from ..file_search_tool_param import FileSearchToolParam
from ..code_interpreter_tool_param import CodeInterpreterToolParam
from ..assistant_tool_choice_option_param import AssistantToolChoiceOptionParam
from ..assistant_response_format_option_param import AssistantResponseFormatOptionParam

__all__ = [
"RunCreateParamsBase",
"AdditionalMessage",
"AdditionalMessageAttachment",
"AdditionalMessageAttachmentTool",
"TruncationStrategy",
"RunCreateParamsNonStreaming",
"RunCreateParamsStreaming",
@@ -159,11 +162,15 @@ class RunCreateParamsBase(TypedDict, total=False):
"""


AdditionalMessageAttachmentTool = Union[CodeInterpreterToolParam, FileSearchToolParam]


class AdditionalMessageAttachment(TypedDict, total=False):
file_id: str
"""The ID of the file to attach to the message."""

tools: List[Literal["file_search", "code_interpreter"]]
tools: Iterable[AdditionalMessageAttachmentTool]
"""The tools to add this file to."""


class AdditionalMessage(TypedDict, total=False):
Loading