# This file was auto-generated by Fern from our API Definition.

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
from .completion_create_params_non_streaming_messages_item import CompletionCreateParamsNonStreamingMessagesItem
from .completion_create_params_non_streaming_model import CompletionCreateParamsNonStreamingModel
from .chat_completion_audio_param import ChatCompletionAudioParam
from .completion_create_params_non_streaming_function_call import CompletionCreateParamsNonStreamingFunctionCall
from .openai_types_chat_completion_create_params_function import OpenaiTypesChatCompletionCreateParamsFunction
from .completion_create_params_non_streaming_modalities_item import CompletionCreateParamsNonStreamingModalitiesItem
from .chat_completion_prediction_content_param import ChatCompletionPredictionContentParam
from .completion_create_params_non_streaming_reasoning_effort import CompletionCreateParamsNonStreamingReasoningEffort
from .completion_create_params_non_streaming_response_format import CompletionCreateParamsNonStreamingResponseFormat
from .completion_create_params_non_streaming_service_tier import CompletionCreateParamsNonStreamingServiceTier
from .completion_create_params_non_streaming_stop import CompletionCreateParamsNonStreamingStop
from .chat_completion_stream_options_param import ChatCompletionStreamOptionsParam
from .completion_create_params_non_streaming_tool_choice import CompletionCreateParamsNonStreamingToolChoice
from .chat_completion_tool_param import ChatCompletionToolParam
from .web_search_options import WebSearchOptions
from ..core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class CompletionCreateParamsNonStreaming(UncheckedBaseModel):
    messages: typing.List[CompletionCreateParamsNonStreamingMessagesItem]
    model: CompletionCreateParamsNonStreamingModel
    audio: typing.Optional[ChatCompletionAudioParam] = None
    frequency_penalty: typing.Optional[float] = None
    function_call: typing.Optional[CompletionCreateParamsNonStreamingFunctionCall] = None
    functions: typing.Optional[typing.List[OpenaiTypesChatCompletionCreateParamsFunction]] = None
    logit_bias: typing.Optional[typing.Dict[str, typing.Optional[int]]] = None
    logprobs: typing.Optional[bool] = None
    max_completion_tokens: typing.Optional[int] = None
    max_tokens: typing.Optional[int] = None
    metadata: typing.Optional[typing.Dict[str, typing.Optional[str]]] = None
    modalities: typing.Optional[typing.List[CompletionCreateParamsNonStreamingModalitiesItem]] = None
    n: typing.Optional[int] = None
    parallel_tool_calls: typing.Optional[bool] = None
    prediction: typing.Optional[ChatCompletionPredictionContentParam] = None
    presence_penalty: typing.Optional[float] = None
    reasoning_effort: typing.Optional[CompletionCreateParamsNonStreamingReasoningEffort] = None
    response_format: typing.Optional[CompletionCreateParamsNonStreamingResponseFormat] = None
    seed: typing.Optional[int] = None
    service_tier: typing.Optional[CompletionCreateParamsNonStreamingServiceTier] = None
    stop: typing.Optional[CompletionCreateParamsNonStreamingStop] = None
    store: typing.Optional[bool] = None
    stream_options: typing.Optional[ChatCompletionStreamOptionsParam] = None
    temperature: typing.Optional[float] = None
    tool_choice: typing.Optional[CompletionCreateParamsNonStreamingToolChoice] = None
    tools: typing.Optional[typing.List[ChatCompletionToolParam]] = None
    top_logprobs: typing.Optional[int] = None
    top_p: typing.Optional[float] = None
    user: typing.Optional[str] = None
    web_search_options: typing.Optional[WebSearchOptions] = None
    stream: typing.Optional[bool] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
