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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .open_ai_audio_config import OpenAiAudioConfig
from .open_ai_session_config_max_response_output_tokens import OpenAiSessionConfigMaxResponseOutputTokens
from .open_ai_session_config_tool_choice import OpenAiSessionConfigToolChoice
from .open_ai_session_config_tools_item import OpenAiSessionConfigToolsItem


class OpenAiSessionConfig(UncheckedBaseModel):
    type: typing.Optional[typing.Literal["realtime"]] = None
    model: typing.Optional[str] = None
    instructions: typing.Optional[str] = None
    modalities: typing.Optional[typing.List[str]] = None
    audio: typing.Optional[OpenAiAudioConfig] = None
    tools: typing.Optional[typing.List[OpenAiSessionConfigToolsItem]] = None
    tool_choice: typing.Optional[OpenAiSessionConfigToolChoice] = None
    temperature: typing.Optional[float] = None
    max_response_output_tokens: typing.Optional[OpenAiSessionConfigMaxResponseOutputTokens] = None
    output_modalities: typing.Optional[typing.List[str]] = 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
