diff --git a/src/openai/types/beta/thread_create_and_run_params.py b/src/openai/types/beta/thread_create_and_run_params.py index 036d8a78da..9adb049843 100644 --- a/src/openai/types/beta/thread_create_and_run_params.py +++ b/src/openai/types/beta/thread_create_and_run_params.py @@ -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): diff --git a/src/openai/types/beta/thread_create_params.py b/src/openai/types/beta/thread_create_params.py index ac85e3c9e1..ab2df21ed7 100644 --- a/src/openai/types/beta/thread_create_params.py +++ b/src/openai/types/beta/thread_create_params.py @@ -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): diff --git a/src/openai/types/beta/threads/message.py b/src/openai/types/beta/threads/message.py index ffc64545db..ebaabdb0f5 100644 --- a/src/openai/types/beta/threads/message.py +++ b/src/openai/types/beta/threads/message.py @@ -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): diff --git a/src/openai/types/beta/threads/message_create_params.py b/src/openai/types/beta/threads/message_create_params.py index 4d47de84f1..5cead598f0 100644 --- a/src/openai/types/beta/threads/message_create_params.py +++ b/src/openai/types/beta/threads/message_create_params.py @@ -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.""" diff --git a/src/openai/types/beta/threads/run_create_params.py b/src/openai/types/beta/threads/run_create_params.py index 0d62b7949f..f4780b7f09 100644 --- a/src/openai/types/beta/threads/run_create_params.py +++ b/src/openai/types/beta/threads/run_create_params.py @@ -2,10 +2,12 @@ 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 @@ -13,6 +15,7 @@ "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): diff --git a/tests/api_resources/beta/test_threads.py b/tests/api_resources/beta/test_threads.py index 9b3de393f0..715e3e8726 100644 --- a/tests/api_resources/beta/test_threads.py +++ b/tests/api_resources/beta/test_threads.py @@ -36,15 +36,27 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None: "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -55,15 +67,27 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None: "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -74,15 +98,27 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None: "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -277,15 +313,27 @@ def test_method_create_and_run_with_all_params_overload_1(self, client: OpenAI) "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -296,15 +344,27 @@ def test_method_create_and_run_with_all_params_overload_1(self, client: OpenAI) "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -315,15 +375,27 @@ def test_method_create_and_run_with_all_params_overload_1(self, client: OpenAI) "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -409,15 +481,27 @@ def test_method_create_and_run_with_all_params_overload_2(self, client: OpenAI) "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -428,15 +512,27 @@ def test_method_create_and_run_with_all_params_overload_2(self, client: OpenAI) "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -447,15 +543,27 @@ def test_method_create_and_run_with_all_params_overload_2(self, client: OpenAI) "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -533,15 +641,27 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -552,15 +672,27 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -571,15 +703,27 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -774,15 +918,27 @@ async def test_method_create_and_run_with_all_params_overload_1(self, async_clie "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -793,15 +949,27 @@ async def test_method_create_and_run_with_all_params_overload_1(self, async_clie "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -812,15 +980,27 @@ async def test_method_create_and_run_with_all_params_overload_1(self, async_clie "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -906,15 +1086,27 @@ async def test_method_create_and_run_with_all_params_overload_2(self, async_clie "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -925,15 +1117,27 @@ async def test_method_create_and_run_with_all_params_overload_2(self, async_clie "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -944,15 +1148,27 @@ async def test_method_create_and_run_with_all_params_overload_2(self, async_clie "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, diff --git a/tests/api_resources/beta/threads/test_messages.py b/tests/api_resources/beta/threads/test_messages.py index c6492464da..26eb09acdd 100644 --- a/tests/api_resources/beta/threads/test_messages.py +++ b/tests/api_resources/beta/threads/test_messages.py @@ -36,15 +36,15 @@ def test_method_create_with_all_params(self, client: OpenAI) -> None: attachments=[ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [{"type": "code_interpreter"}, {"type": "code_interpreter"}, {"type": "code_interpreter"}], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [{"type": "code_interpreter"}, {"type": "code_interpreter"}, {"type": "code_interpreter"}], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [{"type": "code_interpreter"}, {"type": "code_interpreter"}, {"type": "code_interpreter"}], }, ], metadata={}, @@ -265,15 +265,15 @@ async def test_method_create_with_all_params(self, async_client: AsyncOpenAI) -> attachments=[ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [{"type": "code_interpreter"}, {"type": "code_interpreter"}, {"type": "code_interpreter"}], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [{"type": "code_interpreter"}, {"type": "code_interpreter"}, {"type": "code_interpreter"}], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [{"type": "code_interpreter"}, {"type": "code_interpreter"}, {"type": "code_interpreter"}], }, ], metadata={}, diff --git a/tests/api_resources/beta/threads/test_runs.py b/tests/api_resources/beta/threads/test_runs.py index 43065133d6..429c9bdeeb 100644 --- a/tests/api_resources/beta/threads/test_runs.py +++ b/tests/api_resources/beta/threads/test_runs.py @@ -43,15 +43,27 @@ def test_method_create_with_all_params_overload_1(self, client: OpenAI) -> None: "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -62,15 +74,27 @@ def test_method_create_with_all_params_overload_1(self, client: OpenAI) -> None: "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -81,15 +105,27 @@ def test_method_create_with_all_params_overload_1(self, client: OpenAI) -> None: "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -170,15 +206,27 @@ def test_method_create_with_all_params_overload_2(self, client: OpenAI) -> None: "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -189,15 +237,27 @@ def test_method_create_with_all_params_overload_2(self, client: OpenAI) -> None: "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -208,15 +268,27 @@ def test_method_create_with_all_params_overload_2(self, client: OpenAI) -> None: "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -635,15 +707,27 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -654,15 +738,27 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -673,15 +769,27 @@ async def test_method_create_with_all_params_overload_1(self, async_client: Asyn "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -762,15 +870,27 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -781,15 +901,27 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {}, @@ -800,15 +932,27 @@ async def test_method_create_with_all_params_overload_2(self, async_client: Asyn "attachments": [ { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, { "file_id": "string", - "tools": ["file_search", "code_interpreter"], + "tools": [ + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + {"type": "code_interpreter"}, + ], }, ], "metadata": {},