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

import datetime as dt
import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .comment_compare import CommentCompare
from .feedback_score_compare import FeedbackScoreCompare
from .json_list_string_compare import JsonListStringCompare


class ExperimentItemCompare(UniversalBaseModel):
    id: typing.Optional[str] = None
    experiment_id: str
    dataset_item_id: str
    trace_id: str
    input: typing.Optional[JsonListStringCompare] = None
    output: typing.Optional[JsonListStringCompare] = None
    feedback_scores: typing.Optional[typing.List[FeedbackScoreCompare]] = None
    comments: typing.Optional[typing.List[CommentCompare]] = None
    total_estimated_cost: typing.Optional[float] = None
    duration: typing.Optional[float] = None
    usage: typing.Optional[typing.Dict[str, int]] = None
    created_at: typing.Optional[dt.datetime] = None
    last_updated_at: typing.Optional[dt.datetime] = None
    created_by: typing.Optional[str] = None
    last_updated_by: typing.Optional[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
