5
5
from typing import Dict , List , Union , Iterable , Optional
6
6
from typing_extensions import Literal , Required , TypeAlias , TypedDict
7
7
8
- from ...types import shared_params
9
8
from ..chat_model import ChatModel
10
9
from .chat_completion_tool_param import ChatCompletionToolParam
11
10
from .chat_completion_message_param import ChatCompletionMessageParam
11
+ from ..shared_params .function_parameters import FunctionParameters
12
+ from ..shared_params .response_format_text import ResponseFormatText
12
13
from .chat_completion_stream_options_param import ChatCompletionStreamOptionsParam
13
14
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
14
17
from .chat_completion_function_call_option_param import ChatCompletionFunctionCallOptionParam
15
18
16
19
__all__ = [
@@ -244,7 +247,7 @@ class Function(TypedDict, total=False):
244
247
how to call the function.
245
248
"""
246
249
247
- parameters : shared_params . FunctionParameters
250
+ parameters : FunctionParameters
248
251
"""The parameters the functions accepts, described as a JSON Schema object.
249
252
250
253
See the [guide](https://platform.openai.com/docs/guides/function-calling) for
@@ -256,9 +259,7 @@ class Function(TypedDict, total=False):
256
259
"""
257
260
258
261
259
- ResponseFormat : TypeAlias = Union [
260
- shared_params .ResponseFormatText , shared_params .ResponseFormatJSONObject , shared_params .ResponseFormatJSONSchema
261
- ]
262
+ ResponseFormat : TypeAlias = Union [ResponseFormatText , ResponseFormatJSONObject , ResponseFormatJSONSchema ]
262
263
263
264
264
265
class CompletionCreateParamsNonStreaming (CompletionCreateParamsBase ):
0 commit comments