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

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


class Llm(UniversalBaseModel):
    """
    A LLM can be used to enhance query results with a response, and be used as
    the responder during a chat.
    """

    id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The ID of the LLM. This is used as the model ID in a query.
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Name of the LLM.
    """

    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    The description of the LLM.
    """

    enabled: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Indicates whether the LLM is enabled.
    """

    default: typing.Optional[bool] = pydantic.Field(default=None)
    """
    If this is the default LLM, it is used in queries when the generator
    is not specified.
    """

    prompts: typing.Optional[typing.Optional[typing.Any]] = 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
