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

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


class ReasoningTextTypedDict(TypedDict):
    text: str
    r"""The text of the reasoning."""
    type: Literal["reasoning_text"]


class ReasoningText(BaseModel):
    text: str
    r"""The text of the reasoning."""

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