from typing import Literal

from ..base import BaseModel


class SaveWeightsResponse(BaseModel):
    path: str
    """权重文件的路径"""

    model: str
    """模型名称"""

    size: int
    """权重文件的大小, 字节"""

    type: Literal["save-checkpoint"] = "save-checkpoint"
    """权重类型，固定为 "save-checkpoint" """

    elapsed_time: float = 0.0
    """事件处理耗时, 毫秒"""
