Commit ab57d86d

stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
2024-08-13 03:21:15
chore(internal): update some imports (#1642)
1 parent f1e1060
src/openai/types/beta/assistant_response_format_option_param.py
@@ -5,13 +5,12 @@ from __future__ import annotations
 from typing import Union
 from typing_extensions import Literal, TypeAlias
 
-from ...types import shared_params
+from ..shared_params.response_format_text import ResponseFormatText
+from ..shared_params.response_format_json_object import ResponseFormatJSONObject
+from ..shared_params.response_format_json_schema import ResponseFormatJSONSchema
 
 __all__ = ["AssistantResponseFormatOptionParam"]
 
 AssistantResponseFormatOptionParam: TypeAlias = Union[
-    Literal["auto"],
-    shared_params.ResponseFormatText,
-    shared_params.ResponseFormatJSONObject,
-    shared_params.ResponseFormatJSONSchema,
+    Literal["auto"], ResponseFormatText, ResponseFormatJSONObject, ResponseFormatJSONSchema
 ]
src/openai/types/beta/function_tool_param.py
@@ -4,13 +4,13 @@ from __future__ import annotations
 
 from typing_extensions import Literal, Required, TypedDict
 
-from ...types import shared_params
+from ..shared_params.function_definition import FunctionDefinition
 
 __all__ = ["FunctionToolParam"]
 
 
 class FunctionToolParam(TypedDict, total=False):
-    function: Required[shared_params.FunctionDefinition]
+    function: Required[FunctionDefinition]
 
     type: Required[Literal["function"]]
     """The type of tool being defined: `function`"""
src/openai/types/chat/chat_completion_tool_param.py
@@ -4,13 +4,13 @@ from __future__ import annotations
 
 from typing_extensions import Literal, Required, TypedDict
 
-from ...types import shared_params
+from ..shared_params.function_definition import FunctionDefinition
 
 __all__ = ["ChatCompletionToolParam"]
 
 
 class ChatCompletionToolParam(TypedDict, total=False):
-    function: Required[shared_params.FunctionDefinition]
+    function: Required[FunctionDefinition]
 
     type: Required[Literal["function"]]
     """The type of the tool. Currently, only `function` is supported."""
src/openai/types/chat/completion_create_params.py
@@ -5,12 +5,15 @@ from __future__ import annotations
 from typing import Dict, List, Union, Iterable, Optional
 from typing_extensions import Literal, Required, TypeAlias, TypedDict
 
-from ...types import shared_params
 from ..chat_model import ChatModel
 from .chat_completion_tool_param import ChatCompletionToolParam
 from .chat_completion_message_param import ChatCompletionMessageParam
+from ..shared_params.function_parameters import FunctionParameters
+from ..shared_params.response_format_text import ResponseFormatText
 from .chat_completion_stream_options_param import ChatCompletionStreamOptionsParam
 from .chat_completion_tool_choice_option_param import ChatCompletionToolChoiceOptionParam
+from ..shared_params.response_format_json_object import ResponseFormatJSONObject
+from ..shared_params.response_format_json_schema import ResponseFormatJSONSchema
 from .chat_completion_function_call_option_param import ChatCompletionFunctionCallOptionParam
 
 __all__ = [
@@ -244,7 +247,7 @@ class Function(TypedDict, total=False):
     how to call the function.
     """
 
-    parameters: shared_params.FunctionParameters
+    parameters: FunctionParameters
     """The parameters the functions accepts, described as a JSON Schema object.
 
     See the [guide](https://platform.openai.com/docs/guides/function-calling) for
@@ -256,9 +259,7 @@ class Function(TypedDict, total=False):
     """
 
 
-ResponseFormat: TypeAlias = Union[
-    shared_params.ResponseFormatText, shared_params.ResponseFormatJSONObject, shared_params.ResponseFormatJSONSchema
-]
+ResponseFormat: TypeAlias = Union[ResponseFormatText, ResponseFormatJSONObject, ResponseFormatJSONSchema]
 
 
 class CompletionCreateParamsNonStreaming(CompletionCreateParamsBase):
src/openai/types/shared_params/function_definition.py
@@ -5,7 +5,7 @@ from __future__ import annotations
 from typing import Optional
 from typing_extensions import Required, TypedDict
 
-from ...types import shared_params
+from .function_parameters import FunctionParameters
 
 __all__ = ["FunctionDefinition"]
 
@@ -24,7 +24,7 @@ class FunctionDefinition(TypedDict, total=False):
     how to call the function.
     """
 
-    parameters: shared_params.FunctionParameters
+    parameters: FunctionParameters
     """The parameters the functions accepts, described as a JSON Schema object.
 
     See the [guide](https://platform.openai.com/docs/guides/function-calling) for