# Generated by ariadne-codegen
# Source: vals/graphql/

from typing import Any, Optional

from pydantic import Field

from .base_model import BaseModel
from .fragments import (
    MetadataOutputTypeFields,
    ResultJsonElementTypeFields,
    TestFragment,
)


class UploadTestResult(BaseModel):
    upload_local_evaluation: Optional["UploadTestResultUploadLocalEvaluation"] = Field(
        alias="uploadLocalEvaluation"
    )


class UploadTestResultUploadLocalEvaluation(BaseModel):
    test_results: list["UploadTestResultUploadLocalEvaluationTestResults"] = Field(
        alias="testResults"
    )


class UploadTestResultUploadLocalEvaluationTestResults(BaseModel):
    id: Any
    llm_output: str = Field(alias="llmOutput")
    result_json: list["UploadTestResultUploadLocalEvaluationTestResultsResultJson"] = (
        Field(alias="resultJson")
    )
    qa_pair: "UploadTestResultUploadLocalEvaluationTestResultsQaPair" = Field(
        alias="qaPair"
    )
    test: "UploadTestResultUploadLocalEvaluationTestResultsTest"
    metadata: "UploadTestResultUploadLocalEvaluationTestResultsMetadata"
    pass_percentage: float = Field(alias="passPercentage")
    pass_percentage_with_weight: float = Field(alias="passPercentageWithWeight")


class UploadTestResultUploadLocalEvaluationTestResultsResultJson(
    ResultJsonElementTypeFields
):
    pass


class UploadTestResultUploadLocalEvaluationTestResultsQaPair(BaseModel):
    context: Any
    output_context: Any = Field(alias="outputContext")
    error_message: str = Field(alias="errorMessage")


class UploadTestResultUploadLocalEvaluationTestResultsTest(TestFragment):
    pass


class UploadTestResultUploadLocalEvaluationTestResultsMetadata(
    MetadataOutputTypeFields
):
    pass


UploadTestResult.model_rebuild()
UploadTestResultUploadLocalEvaluation.model_rebuild()
UploadTestResultUploadLocalEvaluationTestResults.model_rebuild()
