Commit bf8a453f
Changed files (11)
src
openai
resources
beta
threads
chat
src/openai/resources/beta/threads/runs/runs.py
@@ -165,7 +165,7 @@ class Runs(SyncAPIResource):
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 @@ class Runs(SyncAPIResource):
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 @@ class Runs(SyncAPIResource):
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 @@ class AsyncRuns(AsyncAPIResource):
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 @@ class AsyncRuns(AsyncAPIResource):
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 @@ class AsyncRuns(AsyncAPIResource):
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
src/openai/resources/beta/threads/threads.py
@@ -342,7 +342,7 @@ class Threads(SyncAPIResource):
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 @@ class Threads(SyncAPIResource):
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 @@ class Threads(SyncAPIResource):
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 @@ class AsyncThreads(AsyncAPIResource):
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 @@ class AsyncThreads(AsyncAPIResource):
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 @@ class AsyncThreads(AsyncAPIResource):
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
src/openai/resources/chat/completions.py
@@ -133,7 +133,7 @@ class Completions(SyncAPIResource):
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 @@ class Completions(SyncAPIResource):
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 @@ class Completions(SyncAPIResource):
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 @@ class AsyncCompletions(AsyncAPIResource):
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 @@ class AsyncCompletions(AsyncAPIResource):
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 @@ class AsyncCompletions(AsyncAPIResource):
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
src/openai/types/beta/threads/message.py
@@ -5,12 +5,23 @@ 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", "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):
src/openai/types/beta/threads/message_create_params.py
@@ -5,11 +5,10 @@ from __future__ import annotations
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):
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.
"""
src/openai/types/beta/threads/run_create_params.py
@@ -6,7 +6,6 @@ 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 .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 @@ __all__ = [
"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):
src/openai/types/beta/thread_create_and_run_params.py
@@ -18,6 +18,7 @@ __all__ = [
"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):
src/openai/types/beta/thread_create_params.py
@@ -5,7 +5,6 @@ from __future__ import annotations
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 @@ __all__ = [
"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):
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.
"""
.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