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

from __future__ import annotations
from .imageurl import ImageURL, ImageURLTypedDict
from opperai.types import BaseModel
from opperai.utils import validate_const
import pydantic
from pydantic.functional_validators import AfterValidator
from typing import Literal
from typing_extensions import Annotated, TypedDict


class ChatCompletionContentPartImageParamTypedDict(TypedDict):
    image_url: ImageURLTypedDict
    type: Literal["image_url"]


class ChatCompletionContentPartImageParam(BaseModel):
    image_url: ImageURL

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