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

from __future__ import annotations
from .chatcompletioncontentparttextparam import (
    ChatCompletionContentPartTextParam,
    ChatCompletionContentPartTextParamTypedDict,
)
from opperai.types import BaseModel
from opperai.utils import validate_const
import pydantic
from pydantic.functional_validators import AfterValidator
from typing import List, Literal, Union
from typing_extensions import Annotated, TypeAliasType, TypedDict


ChatCompletionPredictionContentParamContentTypedDict = TypeAliasType(
    "ChatCompletionPredictionContentParamContentTypedDict",
    Union[str, List[ChatCompletionContentPartTextParamTypedDict]],
)


ChatCompletionPredictionContentParamContent = TypeAliasType(
    "ChatCompletionPredictionContentParamContent",
    Union[str, List[ChatCompletionContentPartTextParam]],
)


class ChatCompletionPredictionContentParamTypedDict(TypedDict):
    content: ChatCompletionPredictionContentParamContentTypedDict
    type: Literal["content"]


class ChatCompletionPredictionContentParam(BaseModel):
    content: ChatCompletionPredictionContentParamContent

    TYPE: Annotated[
        Annotated[Literal["content"], AfterValidator(validate_const("content"))],
        pydantic.Field(alias="type"),
    ] = "content"
