# 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 .agent_v1settings_agent_context import AgentV1SettingsAgentContext
from .agent_v1settings_agent_listen import AgentV1SettingsAgentListen
from .agent_v1settings_agent_speak import AgentV1SettingsAgentSpeak
from .agent_v1settings_agent_think import AgentV1SettingsAgentThink


class AgentV1SettingsAgent(UniversalBaseModel):
    language: typing.Optional[str] = pydantic.Field(default=None)
    """
    Deprecated. Use `listen.provider.language` and `speak.provider.language` fields instead.
    """

    context: typing.Optional[AgentV1SettingsAgentContext] = pydantic.Field(default=None)
    """
    Conversation context including the history of messages and function calls
    """

    listen: typing.Optional[AgentV1SettingsAgentListen] = None
    think: typing.Optional[AgentV1SettingsAgentThink] = None
    speak: typing.Optional[AgentV1SettingsAgentSpeak] = None
    greeting: typing.Optional[str] = pydantic.Field(default=None)
    """
    Optional message that agent will speak at the start
    """

    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
