"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .assistantmessage import AssistantMessage, AssistantMessageTypedDict
from .systemmessage import SystemMessage, SystemMessageTypedDict
from .toolmessage import ToolMessage, ToolMessageTypedDict
from .usermessage import UserMessage, UserMessageTypedDict
from pydantic import Field
from typing import Union
from typing_extensions import Annotated, TypeAliasType

MessageTypedDict = TypeAliasType(
    "MessageTypedDict",
    Union[
        SystemMessageTypedDict,
        UserMessageTypedDict,
        AssistantMessageTypedDict,
        ToolMessageTypedDict,
    ],
)
Message = Annotated[
    Union[AssistantMessage, SystemMessage, ToolMessage, UserMessage],
    Field(discriminator="ROLE"),
]
