# This file was auto-generated by Fern from our API Definition.

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class FlushSignal(UniversalBaseModel):
    """
    Forces the text buffer to process immediately, regardless of the min_buffer_size threshold.
    Use this when you need to process remaining text that hasn't reached the minimum buffer size.
    """

    type: typing.Literal["flush"] = "flush"

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
