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

from __future__ import annotations

import typing

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


class AgentV1SettingsAgentListenProvider_V1(UniversalBaseModel):
    version: typing.Literal["v1"] = "v1"
    type: typing.Literal["deepgram"] = "deepgram"
    model: typing.Optional[str] = None
    language: typing.Optional[str] = None
    keyterms: typing.Optional[typing.List[str]] = None
    smart_format: typing.Optional[bool] = 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


class AgentV1SettingsAgentListenProvider_V2(UniversalBaseModel):
    version: typing.Literal["v2"] = "v2"
    type: typing.Literal["deepgram"] = "deepgram"
    model: str
    keyterms: typing.Optional[typing.List[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


AgentV1SettingsAgentListenProvider = typing_extensions.Annotated[
    typing.Union[AgentV1SettingsAgentListenProvider_V1, AgentV1SettingsAgentListenProvider_V2],
    pydantic.Field(discriminator="version"),
]
