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

from __future__ import annotations
from ..core.pydantic_utilities import UniversalBaseModel
from .metadata_filters import MetadataFilters
import typing
import pydantic
from .preset_retrieval_params import PresetRetrievalParams
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.pydantic_utilities import update_forward_refs


class RetrieverPipeline(UniversalBaseModel):
    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    A name for the retriever tool. Will default to the pipeline name if not provided.
    """

    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    A description of the retriever tool.
    """

    pipeline_id: str = pydantic.Field()
    """
    The ID of the pipeline this tool uses.
    """

    preset_retrieval_parameters: typing.Optional[PresetRetrievalParams] = pydantic.Field(default=None)
    """
    Parameters for retrieval configuration.
    """

    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


update_forward_refs(MetadataFilters, RetrieverPipeline=RetrieverPipeline)
