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

from __future__ import annotations

import typing

import typing_extensions

from .chat_ml_image_content_part import ChatMlImageContentPart
from .chat_ml_text_content_part import ChatMlTextContentPart


class ChatMlMessageContentItem_Text(ChatMlTextContentPart):
    type: typing_extensions.Literal["text"]

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True


class ChatMlMessageContentItem_ImageUrl(ChatMlImageContentPart):
    type: typing_extensions.Literal["image_url"]

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True


ChatMlMessageContentItem = typing.Union[
    ChatMlMessageContentItem_Text, ChatMlMessageContentItem_ImageUrl
]
