# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

from typing import Dict, List, Union
from typing_extensions import Literal, Required, TypeAlias, TypedDict

__all__ = [
    "EvaluationDatasetCreateParams",
    "ManualEvaluationDatasetRequest",
    "AutoGeneratedEvaluationDatasetRequest",
    "SafetyEvaluationDatasetRequest",
]


class ManualEvaluationDatasetRequest(TypedDict, total=False):
    account_id: Required[str]
    """The ID of the account that owns the given entity."""

    name: Required[str]
    """The name of the dataset"""

    schema_type: Required[Literal["GENERATION", "FLEXIBLE"]]
    """An enumeration."""

    type: Literal["manual"]
    """Manually or automatically generated dataset"""


class AutoGeneratedEvaluationDatasetRequest(TypedDict, total=False):
    account_id: Required[str]
    """The ID of the account that owns the given entity."""

    knowledge_base_id: Required[str]
    """ID of the knowledge base to generate the evaluation dataset from."""

    name: Required[str]
    """The name of the dataset"""

    schema_type: Required[Literal["GENERATION"]]
    """The schema type of the dataset. Only GENERATION is currently supported."""

    type: Literal["autogenerated"]
    """Manually or automatically generated dataset"""


class SafetyEvaluationDatasetRequest(TypedDict, total=False):
    account_id: Required[str]
    """The ID of the account that owns the given entity."""

    advanced_config: Required[Dict[str, List[str]]]
    """Advanced configuration for the safety evaluation dataset."""

    harms_list: Required[List[str]]
    """List of harms to generate the dataset for."""

    name: Required[str]
    """The name of the dataset"""

    schema_type: Required[Literal["GENERATION"]]
    """The schema type of the dataset. Only GENERATION is currently supported."""

    type: Literal["safety"]
    """Manually or automatically generated dataset"""


EvaluationDatasetCreateParams: TypeAlias = Union[
    ManualEvaluationDatasetRequest, AutoGeneratedEvaluationDatasetRequest, SafetyEvaluationDatasetRequest
]
