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

from ...commons.types.conversation_base import ConversationBase
import typing_extensions
from ...commons.types.entity_id_base import EntityIdBase
from ...core.serialization import FieldMetadata
import pydantic
import typing
from .conversation_message_request import ConversationMessageRequest
from ...core.pydantic_utilities import IS_PYDANTIC_V2


class ConversationRequest(ConversationBase):
    conversation_id: typing_extensions.Annotated[EntityIdBase, FieldMetadata(alias="conversationId")] = pydantic.Field()
    """
    An externally supplied ID to uniquely identify this conversation
    """

    messages: typing.List[ConversationMessageRequest] = pydantic.Field()
    """
    The messages in the conversation
    """

    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
