Skip to content

Commit fce1ea7

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
chore(internal): update some imports (#1642)
1 parent 2623630 commit fce1ea7

File tree

5 files changed

+16
-16
lines changed

5 files changed

+16
-16
lines changed

src/openai/types/beta/assistant_response_format_option_param.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@
55
from typing import Union
66
from typing_extensions import Literal, TypeAlias
77

8-
from ...types import shared_params
8+
from ..shared_params.response_format_text import ResponseFormatText
9+
from ..shared_params.response_format_json_object import ResponseFormatJSONObject
10+
from ..shared_params.response_format_json_schema import ResponseFormatJSONSchema
911

1012
__all__ = ["AssistantResponseFormatOptionParam"]
1113

1214
AssistantResponseFormatOptionParam: TypeAlias = Union[
13-
Literal["auto"],
14-
shared_params.ResponseFormatText,
15-
shared_params.ResponseFormatJSONObject,
16-
shared_params.ResponseFormatJSONSchema,
15+
Literal["auto"], ResponseFormatText, ResponseFormatJSONObject, ResponseFormatJSONSchema
1716
]

src/openai/types/beta/function_tool_param.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
from typing_extensions import Literal, Required, TypedDict
66

7-
from ...types import shared_params
7+
from ..shared_params.function_definition import FunctionDefinition
88

99
__all__ = ["FunctionToolParam"]
1010

1111

1212
class FunctionToolParam(TypedDict, total=False):
13-
function: Required[shared_params.FunctionDefinition]
13+
function: Required[FunctionDefinition]
1414

1515
type: Required[Literal["function"]]
1616
"""The type of tool being defined: `function`"""

src/openai/types/chat/chat_completion_tool_param.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44

55
from typing_extensions import Literal, Required, TypedDict
66

7-
from ...types import shared_params
7+
from ..shared_params.function_definition import FunctionDefinition
88

99
__all__ = ["ChatCompletionToolParam"]
1010

1111

1212
class ChatCompletionToolParam(TypedDict, total=False):
13-
function: Required[shared_params.FunctionDefinition]
13+
function: Required[FunctionDefinition]
1414

1515
type: Required[Literal["function"]]
1616
"""The type of the tool. Currently, only `function` is supported."""

src/openai/types/chat/completion_create_params.py

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

8-
from ...types import shared_params
98
from ..chat_model import ChatModel
109
from .chat_completion_tool_param import ChatCompletionToolParam
1110
from .chat_completion_message_param import ChatCompletionMessageParam
11+
from ..shared_params.function_parameters import FunctionParameters
12+
from ..shared_params.response_format_text import ResponseFormatText
1213
from .chat_completion_stream_options_param import ChatCompletionStreamOptionsParam
1314
from .chat_completion_tool_choice_option_param import ChatCompletionToolChoiceOptionParam
15+
from ..shared_params.response_format_json_object import ResponseFormatJSONObject
16+
from ..shared_params.response_format_json_schema import ResponseFormatJSONSchema
1417
from .chat_completion_function_call_option_param import ChatCompletionFunctionCallOptionParam
1518

1619
__all__ = [
@@ -244,7 +247,7 @@ class Function(TypedDict, total=False):
244247
how to call the function.
245248
"""
246249

247-
parameters: shared_params.FunctionParameters
250+
parameters: FunctionParameters
248251
"""The parameters the functions accepts, described as a JSON Schema object.
249252
250253
See the [guide](https://platform.openai.com/docs/guides/function-calling) for
@@ -256,9 +259,7 @@ class Function(TypedDict, total=False):
256259
"""
257260

258261

259-
ResponseFormat: TypeAlias = Union[
260-
shared_params.ResponseFormatText, shared_params.ResponseFormatJSONObject, shared_params.ResponseFormatJSONSchema
261-
]
262+
ResponseFormat: TypeAlias = Union[ResponseFormatText, ResponseFormatJSONObject, ResponseFormatJSONSchema]
262263

263264

264265
class CompletionCreateParamsNonStreaming(CompletionCreateParamsBase):

src/openai/types/shared_params/function_definition.py

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

8-
from ...types import shared_params
8+
from .function_parameters import FunctionParameters
99

1010
__all__ = ["FunctionDefinition"]
1111

@@ -24,7 +24,7 @@ class FunctionDefinition(TypedDict, total=False):
2424
how to call the function.
2525
"""
2626

27-
parameters: shared_params.FunctionParameters
27+
parameters: FunctionParameters
2828
"""The parameters the functions accepts, described as a JSON Schema object.
2929
3030
See the [guide](https://platform.openai.com/docs/guides/function-calling) for

0 commit comments

Comments
 (0)