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

from ..core.pydantic_utilities import UniversalBaseModel
import pydantic
import typing
import datetime as dt
from .llm_parameters import LlmParameters
from .preset_composite_retrieval_params import PresetCompositeRetrievalParams
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class ChatAppResponse(UniversalBaseModel):
    id: str = pydantic.Field()
    """
    Unique identifier
    """

    created_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Creation datetime
    """

    updated_at: typing.Optional[dt.datetime] = pydantic.Field(default=None)
    """
    Update datetime
    """

    name: str = pydantic.Field()
    """
    Name of the chat app
    """

    retriever_id: str = pydantic.Field()
    """
    ID of the retriever to use for the chat app
    """

    llm_config: LlmParameters = pydantic.Field()
    """
    Configuration for the LLM model to use for the chat app
    """

    retrieval_config: PresetCompositeRetrievalParams = pydantic.Field()
    """
    Configuration for the retrieval model to use for the chat app
    """

    project_id: str = pydantic.Field()
    """
    ID of the project the chat app belongs to
    """

    retriever_name: str

    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
