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

from __future__ import annotations
from .answer import Answer, AnswerTypedDict
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 SurrenderStepTypedDict(TypedDict):
    think: str
    current_question: str
    partial_answer: AnswerTypedDict
    type: Literal["surrender"]


class SurrenderStep(BaseModel):
    think: str

    current_question: str

    partial_answer: Answer

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