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

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


class NoneReranker(UniversalBaseModel):
    type: typing.Literal["none"] = "none"
    limit: typing.Optional[int] = pydantic.Field(default=None)
    """
    Specifies the maximum number of results to be returned after the reranking process.
    When a reranker is applied, it performs the following steps:
    
    1. Reranks all input results according to its algorithm.
    2. Sorts the reranked results based on their new scores.
    3. Returns the top N results, where N is the value specified by this limit.
    
    Note: This limit is applied per reranking stage. In a chain of rerankers,
    each reranker can have its own limit, potentially reducing the number of
    results at each stage.
    """

    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
