"""Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT."""

from __future__ import annotations
import dataclasses
from .evaluationrecordstatus import EvaluationRecordStatus
from .llmevaluationerrortype import LLMEvaluationErrorType
from .ragcriteriaresult import RagCriteriaResult
from .ragrecord import RagRecord
from dataclasses_json import Undefined, dataclass_json
from gantry import utils
from typing import List, Optional


@dataclass_json(undefined=Undefined.EXCLUDE)
@dataclasses.dataclass
class RagEvaluationResult:
    r"""RagEvaluationResult stores both in-flight and completed evaluation result values.

    Completed evaluation results are mapped to EvaluationResults Dynamo model and stored in
    DynamoDB.

    TODO: Create class inheritance based on the in-flight status of the evaluation result.
    """
    criteria_results: List[RagCriteriaResult] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('criteria_results') }})
    record: RagRecord = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('record') }})
    record_id: str = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('record_id') }})
    status: EvaluationRecordStatus = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('status') }})
    r"""An enumeration."""
    timestamp: float = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('timestamp') }})
    topics: List[str] = dataclasses.field(metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('topics') }})
    error_message: Optional[str] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error_message'), 'exclude': lambda f: f is None }})
    error_type: Optional[LLMEvaluationErrorType] = dataclasses.field(default=None, metadata={'dataclasses_json': { 'letter_case': utils.get_field_name('error_type'), 'exclude': lambda f: f is None }})
    r"""An enumeration."""
    

