# 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 .actor_identity import ActorIdentity
from .agent_revision_model import AgentRevisionModel
from .agent_revision_response_style import AgentRevisionResponseStyle
from .model_provider import ModelProvider


class AgentRevision(UncheckedBaseModel):
    id: typing.Optional[str] = None
    doc_type: typing.Optional[typing.Literal["agent_revision"]] = None
    created_by: ActorIdentity
    updated_by: ActorIdentity
    created_at: typing.Optional[dt.datetime] = None
    updated_at: typing.Optional[dt.datetime] = None
    is_seed: typing.Optional[bool] = None
    parent: str
    organization_id: str
    model_provider: typing.Optional[ModelProvider] = None
    model: AgentRevisionModel
    system: str
    temperature: typing.Optional[float] = None
    response_style: typing.Optional[AgentRevisionResponseStyle] = None
    max_tokens: typing.Optional[int] = None
    max_turns: typing.Optional[int] = None
    tool_config: typing.Optional[typing.Dict[str, typing.Optional[bool]]] = None
    conversation_starters: 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
