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

from __future__ import annotations
from .responsecontent import ResponseContent, ResponseContentTypedDict
import pydantic
from pydantic.functional_validators import AfterValidator
from ragie.types import BaseModel
from ragie.utils import validate_const
from typing import List, Literal, Optional
from typing_extensions import Annotated, TypedDict


class ResponseOutputTypedDict(TypedDict):
    id: str
    content: List[ResponseContentTypedDict]
    type: Literal["message"]
    role: Literal["assistant"]


class ResponseOutput(BaseModel):
    id: str

    content: List[ResponseContent]

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

    ROLE: Annotated[
        Annotated[
            Optional[Literal["assistant"]], AfterValidator(validate_const("assistant"))
        ],
        pydantic.Field(alias="role"),
    ] = "assistant"
