# 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 .start_agents_request_properties_parameters_silence_config_action import (
    StartAgentsRequestPropertiesParametersSilenceConfigAction,
)


class StartAgentsRequestPropertiesParametersSilenceConfig(UncheckedBaseModel):
    """
    Settings related to agent silence behavior. Does not apply when you integrate a `mllm`.
    """

    timeout_ms: typing.Optional[int] = pydantic.Field(default=None)
    """
    Specifies the maximum duration (in milliseconds) that the agent can remain silent.
    - `0`: Disables the silent reminder feature.
    - `(0, 60000]`: Enables the silent reminder. You must also set `content`.
    """

    action: typing.Optional[StartAgentsRequestPropertiesParametersSilenceConfigAction] = pydantic.Field(default=None)
    """
    Specifies how the agent behaves when the silent timeout is reached:
    - `speak`: Uses the TTS module to announce the silent prompt (`content`).
    - `think`: Appends the silent prompt (`content`) to the context and passes it to the LLM.
    """

    content: typing.Optional[str] = pydantic.Field(default=None)
    """
    Specifies the silent prompt message. The message use depends on the value of `action` parameter.
    """

    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
