431c54c258
- 前端:ScriptCreation SSE 流式改为 createTask + pollTask 轮询 - 后端:LLM 仅保留 doubao-seed-2-0-pro,删除降级链及相关模型 - 后端:删除所有图片生成代码(ImageParams/ImageTaskParams/generate_image) - 更新 platform-config.yaml、model_router、volcengine_provider、tasks 等
45 lines
848 B
Python
45 lines
848 B
Python
"""
|
|
调度器作业参数 Schema
|
|
=====================
|
|
|
|
定义 Scheduler (Layer 4) 使用的强类型参数模型,
|
|
取代裸 `dict[str, Any]`,根除类型漂移。
|
|
"""
|
|
|
|
from pydantic import BaseModel
|
|
|
|
from app.schemas.segment import Segment
|
|
|
|
|
|
class VideoTaskParams(BaseModel):
|
|
"""视频生成作业参数"""
|
|
|
|
project_id: str
|
|
user_id: str
|
|
segments: list[Segment]
|
|
|
|
|
|
class SubtitleTaskParams(BaseModel):
|
|
"""字幕生成作业参数"""
|
|
|
|
project_id: str
|
|
video_path: str
|
|
language: str = "zh"
|
|
mode: str = "caption" # "caption" | "auto_align"
|
|
audio_text: str | None = None # auto_align 模式时需要
|
|
|
|
|
|
class ScriptTaskParams(BaseModel):
|
|
"""脚本生成作业参数"""
|
|
|
|
topic: str
|
|
style: str
|
|
duration: int
|
|
|
|
|
|
TaskParams = (
|
|
VideoTaskParams
|
|
| SubtitleTaskParams
|
|
| ScriptTaskParams
|
|
)
|