# 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
from .evaluate_item import EvaluateItem


class EvaluateRequest(UncheckedBaseModel):
    """
    Request for POST /evaluation/evaluate - bring your own outputs
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    Name for tracking across runs
    """

    input: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
    actual_output: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
    expected_output: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
    items: typing.Optional[typing.List[EvaluateItem]] = None
    checks: typing.Optional[typing.List[EvaluateCheck]] = None
    tags: typing.Optional[typing.List[str]] = None
    metadata: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
    stream: typing.Optional[bool] = pydantic.Field(default=None)
    """
    Stream results via SSE as each item completes
    """

    max_concurrent: typing.Optional[int] = pydantic.Field(default=None)
    """
    Max concurrent item evaluations (when stream=true)
    """

    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
