Skip to content

Commit 0c57bd7

Browse files
committed
fix(types): correct tool types
1 parent ed370d8 commit 0c57bd7

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/openai/lib/streaming/responses/_events.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@
3939
ResponseMcpListToolsInProgressEvent,
4040
ResponseWebSearchCallCompletedEvent,
4141
ResponseWebSearchCallSearchingEvent,
42+
ResponseCustomToolCallInputDoneEvent,
4243
ResponseFileSearchCallCompletedEvent,
4344
ResponseFileSearchCallSearchingEvent,
4445
ResponseWebSearchCallInProgressEvent,
46+
ResponseCustomToolCallInputDeltaEvent,
4547
ResponseFileSearchCallInProgressEvent,
4648
ResponseImageGenCallPartialImageEvent,
4749
ResponseReasoningSummaryPartDoneEvent,
@@ -139,6 +141,8 @@ class ResponseCompletedEvent(RawResponseCompletedEvent, GenericModel, Generic[Te
139141
ResponseQueuedEvent,
140142
ResponseReasoningTextDeltaEvent,
141143
ResponseReasoningTextDoneEvent,
144+
ResponseCustomToolCallInputDeltaEvent,
145+
ResponseCustomToolCallInputDoneEvent,
142146
],
143147
PropertyInfo(discriminator="type"),
144148
]

src/openai/types/responses/tool_param.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
from typing import Dict, List, Union, Optional
66
from typing_extensions import Literal, Required, TypeAlias, TypedDict
77

8+
from ..chat import ChatCompletionFunctionToolParam
89
from .custom_tool_param import CustomToolParam
910
from .computer_tool_param import ComputerToolParam
1011
from .function_tool_param import FunctionToolParam
1112
from .web_search_tool_param import WebSearchToolParam
1213
from .file_search_tool_param import FileSearchToolParam
13-
from ..chat.chat_completion_tool_param import ChatCompletionToolParam
1414

1515
__all__ = [
1616
"ToolParam",
@@ -191,4 +191,4 @@ class LocalShell(TypedDict, total=False):
191191
]
192192

193193

194-
ParseableToolParam: TypeAlias = Union[ToolParam, ChatCompletionToolParam]
194+
ParseableToolParam: TypeAlias = Union[ToolParam, ChatCompletionFunctionToolParam]

0 commit comments

Comments
 (0)