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

import typing

import pydantic
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .connect_session_settings_audio import ConnectSessionSettingsAudio
from .connect_session_settings_context import ConnectSessionSettingsContext
from .connect_session_settings_variables_value import ConnectSessionSettingsVariablesValue


class ConnectSessionSettings(UniversalBaseModel):
    audio: typing.Optional[ConnectSessionSettingsAudio] = None
    context: typing.Optional[ConnectSessionSettingsContext] = None
    custom_session_id: typing.Optional[str] = None
    event_limit: typing.Optional[int] = None
    language_model_api_key: typing.Optional[str] = None
    system_prompt: typing.Optional[str] = None
    variables: typing.Optional[typing.Dict[str, ConnectSessionSettingsVariablesValue]] = pydantic.Field(default=None)
    """
    This field allows you to assign values to dynamic variables referenced in your system prompt.
    
    Each key represents the variable name, and the corresponding value is the specific content you wish to assign to that variable within the session. While the values for variables can be strings, numbers, or booleans, the value will ultimately be converted to a string when injected into your system prompt.
    
    Using this field, you can personalize responses based on session-specific details. For more guidance, see our [guide on using dynamic variables](/docs/speech-to-speech-evi/features/dynamic-variables).
    """

    voice_id: typing.Optional[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
