diff --git a/.stats.yml b/.stats.yml index eb81a249f1..a6c08f499b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 64 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-ff436357b12348b7c1c930469332a79cd23ac6ec537e645c411893c42de42e57.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-c085faf70d6ff059fbe11b7b6b98123a612524cb9b8a6f649c99526e5b0b1bdb.yml diff --git a/src/openai/resources/beta/threads/runs/runs.py b/src/openai/resources/beta/threads/runs/runs.py index 5976ca4559..43069dd1ae 100644 --- a/src/openai/resources/beta/threads/runs/runs.py +++ b/src/openai/resources/beta/threads/runs/runs.py @@ -165,7 +165,7 @@ def create( assistant will be used. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use. response_format: Specifies the format that the model must output. Compatible with @@ -321,7 +321,7 @@ def create( assistant will be used. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use. response_format: Specifies the format that the model must output. Compatible with @@ -473,7 +473,7 @@ def create( assistant will be used. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use. response_format: Specifies the format that the model must output. Compatible with @@ -1739,7 +1739,7 @@ async def create( assistant will be used. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use. response_format: Specifies the format that the model must output. Compatible with @@ -1895,7 +1895,7 @@ async def create( assistant will be used. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use. response_format: Specifies the format that the model must output. Compatible with @@ -2047,7 +2047,7 @@ async def create( assistant will be used. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use. response_format: Specifies the format that the model must output. Compatible with diff --git a/src/openai/resources/beta/threads/threads.py b/src/openai/resources/beta/threads/threads.py index 05c06ff658..c0a908b7a2 100644 --- a/src/openai/resources/beta/threads/threads.py +++ b/src/openai/resources/beta/threads/threads.py @@ -342,7 +342,7 @@ def create_and_run( assistant will be used. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use. response_format: Specifies the format that the model must output. Compatible with @@ -497,7 +497,7 @@ def create_and_run( assistant will be used. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use. response_format: Specifies the format that the model must output. Compatible with @@ -648,7 +648,7 @@ def create_and_run( assistant will be used. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use. response_format: Specifies the format that the model must output. Compatible with @@ -1352,7 +1352,7 @@ async def create_and_run( assistant will be used. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use. response_format: Specifies the format that the model must output. Compatible with @@ -1507,7 +1507,7 @@ async def create_and_run( assistant will be used. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use. response_format: Specifies the format that the model must output. Compatible with @@ -1658,7 +1658,7 @@ async def create_and_run( assistant will be used. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use. response_format: Specifies the format that the model must output. Compatible with diff --git a/src/openai/resources/chat/completions.py b/src/openai/resources/chat/completions.py index ab35b03335..ed8e9373b0 100644 --- a/src/openai/resources/chat/completions.py +++ b/src/openai/resources/chat/completions.py @@ -133,7 +133,7 @@ def create( choices. Keep `n` as `1` to minimize costs. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use. presence_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on @@ -316,7 +316,7 @@ def create( choices. Keep `n` as `1` to minimize costs. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use. presence_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on @@ -492,7 +492,7 @@ def create( choices. Keep `n` as `1` to minimize costs. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use. presence_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on @@ -741,7 +741,7 @@ async def create( choices. Keep `n` as `1` to minimize costs. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use. presence_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on @@ -924,7 +924,7 @@ async def create( choices. Keep `n` as `1` to minimize costs. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use. presence_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on @@ -1100,7 +1100,7 @@ async def create( choices. Keep `n` as `1` to minimize costs. parallel_tool_calls: Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use. presence_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on 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 b8c69eb7ac..dbbff415ec 100644 --- a/src/openai/types/beta/thread_create_and_run_params.py +++ b/src/openai/types/beta/thread_create_and_run_params.py @@ -18,6 +18,7 @@ "ThreadMessage", "ThreadMessageAttachment", "ThreadMessageAttachmentTool", + "ThreadMessageAttachmentToolFileSearch", "ThreadToolResources", "ThreadToolResourcesCodeInterpreter", "ThreadToolResourcesFileSearch", @@ -112,7 +113,7 @@ class ThreadCreateAndRunParamsBase(TypedDict, total=False): parallel_tool_calls: bool """ Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use. """ @@ -186,7 +187,12 @@ class ThreadCreateAndRunParamsBase(TypedDict, total=False): """ -ThreadMessageAttachmentTool = Union[CodeInterpreterToolParam, FileSearchToolParam] +class ThreadMessageAttachmentToolFileSearch(TypedDict, total=False): + type: Required[Literal["file_search"]] + """The type of tool being defined: `file_search`""" + + +ThreadMessageAttachmentTool = Union[CodeInterpreterToolParam, ThreadMessageAttachmentToolFileSearch] class ThreadMessageAttachment(TypedDict, total=False): diff --git a/src/openai/types/beta/thread_create_params.py b/src/openai/types/beta/thread_create_params.py index 5072ed12d9..e5ea14a94d 100644 --- a/src/openai/types/beta/thread_create_params.py +++ b/src/openai/types/beta/thread_create_params.py @@ -5,7 +5,6 @@ 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 from .threads.message_content_part_param import MessageContentPartParam @@ -14,6 +13,7 @@ "Message", "MessageAttachment", "MessageAttachmentTool", + "MessageAttachmentToolFileSearch", "ToolResources", "ToolResourcesCodeInterpreter", "ToolResourcesFileSearch", @@ -49,7 +49,12 @@ class ThreadCreateParams(TypedDict, total=False): """ -MessageAttachmentTool = Union[CodeInterpreterToolParam, FileSearchToolParam] +class MessageAttachmentToolFileSearch(TypedDict, total=False): + type: Required[Literal["file_search"]] + """The type of tool being defined: `file_search`""" + + +MessageAttachmentTool = Union[CodeInterpreterToolParam, MessageAttachmentToolFileSearch] class MessageAttachment(TypedDict, total=False): diff --git a/src/openai/types/beta/threads/message.py b/src/openai/types/beta/threads/message.py index ebaabdb0f5..90f083683d 100644 --- a/src/openai/types/beta/threads/message.py +++ b/src/openai/types/beta/threads/message.py @@ -5,12 +5,23 @@ from ...._models import BaseModel from .message_content import MessageContent -from ..file_search_tool import FileSearchTool from ..code_interpreter_tool import CodeInterpreterTool -__all__ = ["Message", "Attachment", "AttachmentTool", "IncompleteDetails"] +__all__ = [ + "Message", + "Attachment", + "AttachmentTool", + "AttachmentToolAssistantToolsFileSearchTypeOnly", + "IncompleteDetails", +] -AttachmentTool = Union[CodeInterpreterTool, FileSearchTool] + +class AttachmentToolAssistantToolsFileSearchTypeOnly(BaseModel): + type: Literal["file_search"] + """The type of tool being defined: `file_search`""" + + +AttachmentTool = Union[CodeInterpreterTool, AttachmentToolAssistantToolsFileSearchTypeOnly] class Attachment(BaseModel): diff --git a/src/openai/types/beta/threads/message_create_params.py b/src/openai/types/beta/threads/message_create_params.py index 3668df950d..b1b12293b7 100644 --- a/src/openai/types/beta/threads/message_create_params.py +++ b/src/openai/types/beta/threads/message_create_params.py @@ -5,11 +5,10 @@ from typing import Union, Iterable, Optional from typing_extensions import Literal, Required, TypedDict -from ..file_search_tool_param import FileSearchToolParam from .message_content_part_param import MessageContentPartParam from ..code_interpreter_tool_param import CodeInterpreterToolParam -__all__ = ["MessageCreateParams", "Attachment", "AttachmentTool"] +__all__ = ["MessageCreateParams", "Attachment", "AttachmentTool", "AttachmentToolFileSearch"] class MessageCreateParams(TypedDict, total=False): @@ -37,7 +36,12 @@ class MessageCreateParams(TypedDict, total=False): """ -AttachmentTool = Union[CodeInterpreterToolParam, FileSearchToolParam] +class AttachmentToolFileSearch(TypedDict, total=False): + type: Required[Literal["file_search"]] + """The type of tool being defined: `file_search`""" + + +AttachmentTool = Union[CodeInterpreterToolParam, AttachmentToolFileSearch] class Attachment(TypedDict, total=False): diff --git a/src/openai/types/beta/threads/run.py b/src/openai/types/beta/threads/run.py index ea84f1e97c..81d10d4a56 100644 --- a/src/openai/types/beta/threads/run.py +++ b/src/openai/types/beta/threads/run.py @@ -154,7 +154,7 @@ class Run(BaseModel): parallel_tool_calls: bool """ Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use. """ diff --git a/src/openai/types/beta/threads/run_create_params.py b/src/openai/types/beta/threads/run_create_params.py index a7aa799e00..89da241965 100644 --- a/src/openai/types/beta/threads/run_create_params.py +++ b/src/openai/types/beta/threads/run_create_params.py @@ -6,7 +6,6 @@ from typing_extensions import Literal, Required, TypedDict from ..assistant_tool_param import AssistantToolParam -from ..file_search_tool_param import FileSearchToolParam from .message_content_part_param import MessageContentPartParam from ..code_interpreter_tool_param import CodeInterpreterToolParam from ..assistant_tool_choice_option_param import AssistantToolChoiceOptionParam @@ -17,6 +16,7 @@ "AdditionalMessage", "AdditionalMessageAttachment", "AdditionalMessageAttachmentTool", + "AdditionalMessageAttachmentToolFileSearch", "TruncationStrategy", "RunCreateParamsNonStreaming", "RunCreateParamsStreaming", @@ -110,7 +110,7 @@ class RunCreateParamsBase(TypedDict, total=False): parallel_tool_calls: bool """ Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use. """ @@ -173,7 +173,12 @@ class RunCreateParamsBase(TypedDict, total=False): """ -AdditionalMessageAttachmentTool = Union[CodeInterpreterToolParam, FileSearchToolParam] +class AdditionalMessageAttachmentToolFileSearch(TypedDict, total=False): + type: Required[Literal["file_search"]] + """The type of tool being defined: `file_search`""" + + +AdditionalMessageAttachmentTool = Union[CodeInterpreterToolParam, AdditionalMessageAttachmentToolFileSearch] class AdditionalMessageAttachment(TypedDict, total=False): diff --git a/src/openai/types/chat/completion_create_params.py b/src/openai/types/chat/completion_create_params.py index 47c2a5e24e..7dd7067f66 100644 --- a/src/openai/types/chat/completion_create_params.py +++ b/src/openai/types/chat/completion_create_params.py @@ -105,7 +105,7 @@ class CompletionCreateParamsBase(TypedDict, total=False): parallel_tool_calls: bool """ Whether to enable - [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use. """