"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
import pydantic
from pydantic.functional_validators import AfterValidator
from ragie.types import BaseModel
from ragie.utils import validate_const
from typing import Literal, Optional
from typing_extensions import Annotated, TypedDict


class CodeInterpreterEvidenceTypedDict(TypedDict):
    text: str
    code: str
    r"""The code that was executed."""
    code_issue: str
    r"""The issue that the code was written to solve."""
    code_result: str
    r"""The result of the code that was executed."""
    type: Literal["code_interpreter"]


class CodeInterpreterEvidence(BaseModel):
    text: str

    code: str
    r"""The code that was executed."""

    code_issue: str
    r"""The issue that the code was written to solve."""

    code_result: str
    r"""The result of the code that was executed."""

    TYPE: Annotated[
        Annotated[
            Optional[Literal["code_interpreter"]],
            AfterValidator(validate_const("code_interpreter")),
        ],
        pydantic.Field(alias="type"),
    ] = "code_interpreter"
