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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class TriggerConfigSchema(UniversalBaseModel):
    """
    Trigger configuration for the voice agent.
    """

    wake_words: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Words/phrases that wake the voice agent
    """

    enable_question_detection: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Detect questions and respond
    """

    enable_scheduled_checkin: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Periodic check-in
    """

    checkin_interval_minutes: typing.Optional[int] = pydantic.Field(default=None)
    """
    Check-in interval in minutes
    """

    enable_action_item_detection: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Detect and confirm action items
    """

    enable_silence_detection: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Respond after silence following a question
    """

    silence_threshold_seconds: typing.Optional[float] = pydantic.Field(default=None)
    """
    Silence threshold
    """

    backoff_after_interrupt_seconds: typing.Optional[float] = pydantic.Field(default=None)
    """
    Backoff after interruption
    """

    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
