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

from __future__ import annotations

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs
from ..core.unchecked_base_model import UncheckedBaseModel
from .behavior_override import BehaviorOverride
from .dynamic_variables_config_workflow_override_input import DynamicVariablesConfigWorkflowOverrideInput
from .prompt_agent_api_model_workflow_override_input import PromptAgentApiModelWorkflowOverrideInput


class AgentConfigApiModelWorkflowOverrideInput(UncheckedBaseModel):
    first_message: typing.Optional[str] = pydantic.Field(default=None)
    """
    If non-empty, the first message the agent will say. If empty, the agent waits for the user to start the discussion.
    """

    language: typing.Optional[str] = pydantic.Field(default=None)
    """
    Language of the agent - used for ASR and TTS
    """

    hinglish_mode: typing.Optional[bool] = pydantic.Field(default=None)
    """
    When enabled and language is Hindi, the agent will respond in Hinglish
    """

    dynamic_variables: typing.Optional[DynamicVariablesConfigWorkflowOverrideInput] = pydantic.Field(default=None)
    """
    Configuration for dynamic variables
    """

    disable_first_message_interruptions: typing.Optional[bool] = pydantic.Field(default=None)
    """
    If true, the user will not be able to interrupt the agent while the first message is being delivered.
    """

    max_conversation_duration_message: typing.Optional[str] = pydantic.Field(default=None)
    """
    If non-empty, the message the agent will send when max conversation duration is reached.
    """

    text_behavior_overrides: typing.Optional[typing.Dict[str, typing.Optional[BehaviorOverride]]] = pydantic.Field(
        default=None
    )
    """
    Per-channel response behavior overrides for text conversations. Built-in channel defaults apply when unset.
    """

    prompt: typing.Optional[PromptAgentApiModelWorkflowOverrideInput] = pydantic.Field(default=None)
    """
    The prompt for the agent
    """

    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


update_forward_refs(AgentConfigApiModelWorkflowOverrideInput)
