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

import datetime as dt
import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .provider_enum import ProviderEnum
from .user_simple import UserSimple


class ThirdPartyModelVersion(UncheckedBaseModel):
    created_at: typing.Optional[dt.datetime] = None
    created_by: typing.Optional[UserSimple] = pydantic.Field(default=None)
    """
    User who created Dataset
    """

    id: typing.Optional[int] = None
    model_provider_connection: typing.Optional[int] = None
    organization: typing.Optional[int] = None
    parent_model: typing.Optional[int] = pydantic.Field(default=None)
    """
    Parent model interface ID
    """

    prompt: str = pydantic.Field()
    """
    Prompt to execute
    """

    provider: typing.Optional[ProviderEnum] = pydantic.Field(default=None)
    """
    The model provider to use e.g. OpenAI
    
    * `OpenAI` - OpenAI
    * `AzureOpenAI` - AzureOpenAI
    * `AzureAIFoundry` - AzureAIFoundry
    * `VertexAI` - VertexAI
    * `Gemini` - Gemini
    * `Anthropic` - Anthropic
    * `Custom` - Custom
    """

    provider_model_id: str = pydantic.Field()
    """
    The model ID to use within the given provider, e.g. gpt-3.5
    """

    score: typing.Optional[str] = None
    title: str = pydantic.Field()
    """
    Model name
    """

    updated_at: typing.Optional[dt.datetime] = 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
