from typing import Generic, NotRequired, TypedDict, TypeVar

T = TypeVar("T")


class TaskBaseParameters(TypedDict):
    """任务基础参数"""

    task_id: str  # 任务ID


class TaskResponse(TypedDict, Generic[T]):
    """任务响应"""

    data_type: str
    data: T
    run_time: NotRequired[float]
    cpu_time: NotRequired[float]
    storage_key: NotRequired[str]
