Files
openrouter-python-sdk-retry…/src/openrouter/components/chatcontentitems.py
T

45 lines
1.6 KiB
Python

"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
from __future__ import annotations
from .chatcontentaudio import ChatContentAudio, ChatContentAudioTypedDict
from .chatcontentfile import ChatContentFile, ChatContentFileTypedDict
from .chatcontentimage import ChatContentImage, ChatContentImageTypedDict
from .chatcontenttext import ChatContentText, ChatContentTextTypedDict
from .chatcontentvideo import ChatContentVideo, ChatContentVideoTypedDict
from .legacy_chatcontentvideo import (
LegacyChatContentVideo,
LegacyChatContentVideoTypedDict,
)
from openrouter.utils import get_discriminator
from pydantic import Discriminator, Tag
from typing import Union
from typing_extensions import Annotated, TypeAliasType
ChatContentItemsTypedDict = TypeAliasType(
"ChatContentItemsTypedDict",
Union[
ChatContentImageTypedDict,
ChatContentAudioTypedDict,
LegacyChatContentVideoTypedDict,
ChatContentVideoTypedDict,
ChatContentFileTypedDict,
ChatContentTextTypedDict,
],
)
r"""Content part for chat completion messages"""
ChatContentItems = Annotated[
Union[
Annotated[ChatContentFile, Tag("file")],
Annotated[ChatContentImage, Tag("image_url")],
Annotated[ChatContentAudio, Tag("input_audio")],
Annotated[LegacyChatContentVideo, Tag("input_video")],
Annotated[ChatContentText, Tag("text")],
Annotated[ChatContentVideo, Tag("video_url")],
],
Discriminator(lambda m: get_discriminator(m, "type", "type")),
]
r"""Content part for chat completion messages"""