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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .evaluate_check import EvaluateCheck


class EvaluateItem(UncheckedBaseModel):
    """
    Single item to evaluate
    """

    name: typing.Optional[str] = None
    input: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
    actual_output: typing.Dict[str, typing.Optional[typing.Any]]
    expected_output: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
    checks: typing.Optional[typing.List[EvaluateCheck]] = None
    latency_ms: typing.Optional[int] = None
    tags: typing.Optional[typing.List[str]] = None

    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
