Skip to content

Commit 43175c4

Browse files
committed
fix: remove erroneous thread create argument (#1476)
1 parent 178afa0 commit 43175c4

11 files changed

+65
-34
lines changed

.stats.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
configured_endpoints: 64
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-ff436357b12348b7c1c930469332a79cd23ac6ec537e645c411893c42de42e57.yml
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-c085faf70d6ff059fbe11b7b6b98123a612524cb9b8a6f649c99526e5b0b1bdb.yml

src/openai/resources/beta/threads/runs/runs.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def create(
165165
assistant will be used.
166166
167167
parallel_tool_calls: Whether to enable
168-
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
168+
[parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
169169
during tool use.
170170
171171
response_format: Specifies the format that the model must output. Compatible with
@@ -321,7 +321,7 @@ def create(
321321
assistant will be used.
322322
323323
parallel_tool_calls: Whether to enable
324-
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
324+
[parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
325325
during tool use.
326326
327327
response_format: Specifies the format that the model must output. Compatible with
@@ -473,7 +473,7 @@ def create(
473473
assistant will be used.
474474
475475
parallel_tool_calls: Whether to enable
476-
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
476+
[parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
477477
during tool use.
478478
479479
response_format: Specifies the format that the model must output. Compatible with
@@ -1739,7 +1739,7 @@ async def create(
17391739
assistant will be used.
17401740
17411741
parallel_tool_calls: Whether to enable
1742-
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
1742+
[parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
17431743
during tool use.
17441744
17451745
response_format: Specifies the format that the model must output. Compatible with
@@ -1895,7 +1895,7 @@ async def create(
18951895
assistant will be used.
18961896
18971897
parallel_tool_calls: Whether to enable
1898-
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
1898+
[parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
18991899
during tool use.
19001900
19011901
response_format: Specifies the format that the model must output. Compatible with
@@ -2047,7 +2047,7 @@ async def create(
20472047
assistant will be used.
20482048
20492049
parallel_tool_calls: Whether to enable
2050-
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
2050+
[parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
20512051
during tool use.
20522052
20532053
response_format: Specifies the format that the model must output. Compatible with

src/openai/resources/beta/threads/threads.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def create_and_run(
342342
assistant will be used.
343343
344344
parallel_tool_calls: Whether to enable
345-
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
345+
[parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
346346
during tool use.
347347
348348
response_format: Specifies the format that the model must output. Compatible with
@@ -497,7 +497,7 @@ def create_and_run(
497497
assistant will be used.
498498
499499
parallel_tool_calls: Whether to enable
500-
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
500+
[parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
501501
during tool use.
502502
503503
response_format: Specifies the format that the model must output. Compatible with
@@ -648,7 +648,7 @@ def create_and_run(
648648
assistant will be used.
649649
650650
parallel_tool_calls: Whether to enable
651-
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
651+
[parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
652652
during tool use.
653653
654654
response_format: Specifies the format that the model must output. Compatible with
@@ -1352,7 +1352,7 @@ async def create_and_run(
13521352
assistant will be used.
13531353
13541354
parallel_tool_calls: Whether to enable
1355-
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
1355+
[parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
13561356
during tool use.
13571357
13581358
response_format: Specifies the format that the model must output. Compatible with
@@ -1507,7 +1507,7 @@ async def create_and_run(
15071507
assistant will be used.
15081508
15091509
parallel_tool_calls: Whether to enable
1510-
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
1510+
[parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
15111511
during tool use.
15121512
15131513
response_format: Specifies the format that the model must output. Compatible with
@@ -1658,7 +1658,7 @@ async def create_and_run(
16581658
assistant will be used.
16591659
16601660
parallel_tool_calls: Whether to enable
1661-
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
1661+
[parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
16621662
during tool use.
16631663
16641664
response_format: Specifies the format that the model must output. Compatible with

src/openai/resources/chat/completions.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def create(
133133
choices. Keep `n` as `1` to minimize costs.
134134
135135
parallel_tool_calls: Whether to enable
136-
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
136+
[parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
137137
during tool use.
138138
139139
presence_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on
@@ -316,7 +316,7 @@ def create(
316316
choices. Keep `n` as `1` to minimize costs.
317317
318318
parallel_tool_calls: Whether to enable
319-
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
319+
[parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
320320
during tool use.
321321
322322
presence_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on
@@ -492,7 +492,7 @@ def create(
492492
choices. Keep `n` as `1` to minimize costs.
493493
494494
parallel_tool_calls: Whether to enable
495-
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
495+
[parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
496496
during tool use.
497497
498498
presence_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on
@@ -741,7 +741,7 @@ async def create(
741741
choices. Keep `n` as `1` to minimize costs.
742742
743743
parallel_tool_calls: Whether to enable
744-
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
744+
[parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
745745
during tool use.
746746
747747
presence_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on
@@ -924,7 +924,7 @@ async def create(
924924
choices. Keep `n` as `1` to minimize costs.
925925
926926
parallel_tool_calls: Whether to enable
927-
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
927+
[parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
928928
during tool use.
929929
930930
presence_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on
@@ -1100,7 +1100,7 @@ async def create(
11001100
choices. Keep `n` as `1` to minimize costs.
11011101
11021102
parallel_tool_calls: Whether to enable
1103-
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
1103+
[parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
11041104
during tool use.
11051105
11061106
presence_penalty: Number between -2.0 and 2.0. Positive values penalize new tokens based on

src/openai/types/beta/thread_create_and_run_params.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"ThreadMessage",
1919
"ThreadMessageAttachment",
2020
"ThreadMessageAttachmentTool",
21+
"ThreadMessageAttachmentToolFileSearch",
2122
"ThreadToolResources",
2223
"ThreadToolResourcesCodeInterpreter",
2324
"ThreadToolResourcesFileSearch",
@@ -112,7 +113,7 @@ class ThreadCreateAndRunParamsBase(TypedDict, total=False):
112113
parallel_tool_calls: bool
113114
"""
114115
Whether to enable
115-
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
116+
[parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
116117
during tool use.
117118
"""
118119

@@ -186,7 +187,12 @@ class ThreadCreateAndRunParamsBase(TypedDict, total=False):
186187
"""
187188

188189

189-
ThreadMessageAttachmentTool = Union[CodeInterpreterToolParam, FileSearchToolParam]
190+
class ThreadMessageAttachmentToolFileSearch(TypedDict, total=False):
191+
type: Required[Literal["file_search"]]
192+
"""The type of tool being defined: `file_search`"""
193+
194+
195+
ThreadMessageAttachmentTool = Union[CodeInterpreterToolParam, ThreadMessageAttachmentToolFileSearch]
190196

191197

192198
class ThreadMessageAttachment(TypedDict, total=False):

src/openai/types/beta/thread_create_params.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
from typing import List, Union, Iterable, Optional
66
from typing_extensions import Literal, Required, TypedDict
77

8-
from .file_search_tool_param import FileSearchToolParam
98
from .code_interpreter_tool_param import CodeInterpreterToolParam
109
from .threads.message_content_part_param import MessageContentPartParam
1110

@@ -14,6 +13,7 @@
1413
"Message",
1514
"MessageAttachment",
1615
"MessageAttachmentTool",
16+
"MessageAttachmentToolFileSearch",
1717
"ToolResources",
1818
"ToolResourcesCodeInterpreter",
1919
"ToolResourcesFileSearch",
@@ -49,7 +49,12 @@ class ThreadCreateParams(TypedDict, total=False):
4949
"""
5050

5151

52-
MessageAttachmentTool = Union[CodeInterpreterToolParam, FileSearchToolParam]
52+
class MessageAttachmentToolFileSearch(TypedDict, total=False):
53+
type: Required[Literal["file_search"]]
54+
"""The type of tool being defined: `file_search`"""
55+
56+
57+
MessageAttachmentTool = Union[CodeInterpreterToolParam, MessageAttachmentToolFileSearch]
5358

5459

5560
class MessageAttachment(TypedDict, total=False):

src/openai/types/beta/threads/message.py

+14-3
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,23 @@
55

66
from ...._models import BaseModel
77
from .message_content import MessageContent
8-
from ..file_search_tool import FileSearchTool
98
from ..code_interpreter_tool import CodeInterpreterTool
109

11-
__all__ = ["Message", "Attachment", "AttachmentTool", "IncompleteDetails"]
10+
__all__ = [
11+
"Message",
12+
"Attachment",
13+
"AttachmentTool",
14+
"AttachmentToolAssistantToolsFileSearchTypeOnly",
15+
"IncompleteDetails",
16+
]
1217

13-
AttachmentTool = Union[CodeInterpreterTool, FileSearchTool]
18+
19+
class AttachmentToolAssistantToolsFileSearchTypeOnly(BaseModel):
20+
type: Literal["file_search"]
21+
"""The type of tool being defined: `file_search`"""
22+
23+
24+
AttachmentTool = Union[CodeInterpreterTool, AttachmentToolAssistantToolsFileSearchTypeOnly]
1425

1526

1627
class Attachment(BaseModel):

src/openai/types/beta/threads/message_create_params.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
from typing import Union, Iterable, Optional
66
from typing_extensions import Literal, Required, TypedDict
77

8-
from ..file_search_tool_param import FileSearchToolParam
98
from .message_content_part_param import MessageContentPartParam
109
from ..code_interpreter_tool_param import CodeInterpreterToolParam
1110

12-
__all__ = ["MessageCreateParams", "Attachment", "AttachmentTool"]
11+
__all__ = ["MessageCreateParams", "Attachment", "AttachmentTool", "AttachmentToolFileSearch"]
1312

1413

1514
class MessageCreateParams(TypedDict, total=False):
@@ -37,7 +36,12 @@ class MessageCreateParams(TypedDict, total=False):
3736
"""
3837

3938

40-
AttachmentTool = Union[CodeInterpreterToolParam, FileSearchToolParam]
39+
class AttachmentToolFileSearch(TypedDict, total=False):
40+
type: Required[Literal["file_search"]]
41+
"""The type of tool being defined: `file_search`"""
42+
43+
44+
AttachmentTool = Union[CodeInterpreterToolParam, AttachmentToolFileSearch]
4145

4246

4347
class Attachment(TypedDict, total=False):

src/openai/types/beta/threads/run.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ class Run(BaseModel):
154154
parallel_tool_calls: bool
155155
"""
156156
Whether to enable
157-
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
157+
[parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
158158
during tool use.
159159
"""
160160

src/openai/types/beta/threads/run_create_params.py

+8-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
from typing_extensions import Literal, Required, TypedDict
77

88
from ..assistant_tool_param import AssistantToolParam
9-
from ..file_search_tool_param import FileSearchToolParam
109
from .message_content_part_param import MessageContentPartParam
1110
from ..code_interpreter_tool_param import CodeInterpreterToolParam
1211
from ..assistant_tool_choice_option_param import AssistantToolChoiceOptionParam
@@ -17,6 +16,7 @@
1716
"AdditionalMessage",
1817
"AdditionalMessageAttachment",
1918
"AdditionalMessageAttachmentTool",
19+
"AdditionalMessageAttachmentToolFileSearch",
2020
"TruncationStrategy",
2121
"RunCreateParamsNonStreaming",
2222
"RunCreateParamsStreaming",
@@ -110,7 +110,7 @@ class RunCreateParamsBase(TypedDict, total=False):
110110
parallel_tool_calls: bool
111111
"""
112112
Whether to enable
113-
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
113+
[parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
114114
during tool use.
115115
"""
116116

@@ -173,7 +173,12 @@ class RunCreateParamsBase(TypedDict, total=False):
173173
"""
174174

175175

176-
AdditionalMessageAttachmentTool = Union[CodeInterpreterToolParam, FileSearchToolParam]
176+
class AdditionalMessageAttachmentToolFileSearch(TypedDict, total=False):
177+
type: Required[Literal["file_search"]]
178+
"""The type of tool being defined: `file_search`"""
179+
180+
181+
AdditionalMessageAttachmentTool = Union[CodeInterpreterToolParam, AdditionalMessageAttachmentToolFileSearch]
177182

178183

179184
class AdditionalMessageAttachment(TypedDict, total=False):

src/openai/types/chat/completion_create_params.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ class CompletionCreateParamsBase(TypedDict, total=False):
105105
parallel_tool_calls: bool
106106
"""
107107
Whether to enable
108-
[parallel function calling](https://platform.openai.com/docs/guides/function-calling)
108+
[parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling)
109109
during tool use.
110110
"""
111111

0 commit comments

Comments
 (0)