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

from __future__ import annotations
from .search import Search, SearchTypedDict
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 SearchStepTypedDict(TypedDict):
    think: str
    current_question: str
    search: SearchTypedDict
    type: Literal["search"]


class SearchStep(BaseModel):
    think: str

    current_question: str

    search: Search

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