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

from __future__ import annotations

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel, update_forward_refs
from .corpora_search_query_configuration import CorporaSearchQueryConfiguration
from .corpora_search_tool_parameters import CorporaSearchToolParameters


class InlineCorporaSearchToolConfiguration(UniversalBaseModel):
    """
    A corpora search tool configuration defined inline in the agent.
    """

    type: typing.Literal["corpora_search"] = "corpora_search"
    argument_override: typing.Optional[CorporaSearchToolParameters] = pydantic.Field(default=None)
    """
    Optional hardcoded arguments for the corpus search call such as the query. When specified, these values will be used instead of allowing the LLM to fill in those parameters.
    """

    query_configuration: CorporaSearchQueryConfiguration = pydantic.Field()
    """
    User-configurable settings for the corpus search that are not exposed to the LLM.
    """

    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


from .chain_reranker import ChainReranker  # noqa: E402, F401, I001

update_forward_refs(InlineCorporaSearchToolConfiguration)
