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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .patronus_evaluator import PatronusEvaluator
from .patronus_guardrail_config_config_target import PatronusGuardrailConfigConfigTarget


class PatronusGuardrailConfigConfig(UniversalBaseModel):
    target: PatronusGuardrailConfigConfigTarget = pydantic.Field()
    """
    Where to apply evaluation: request (evaluate user input) or response (evaluate model response)
    """

    evaluators: typing.List[PatronusEvaluator] = pydantic.Field()
    """
    The evaluators to use for the Patronus Guardrail.
    """

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

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