NarratoAI/app/services/SDP/utils/short_schema.py
linyq 6cd1ff8b68 refactor(tools): 移除调试日志和未使用的参数- 在 base.py 中移除了调试日志,以减少日志噪音
- 在 generate_script_short.py 中移除了未使用的参数,简化了 API 调用
2025-05-10 23:57:15 +08:00

61 lines
917 B
Python

"""
定义项目中使用的数据类型
"""
from typing import List, Dict, Optional
from dataclasses import dataclass
@dataclass
class PlotPoint:
timestamp: str
title: str
picture: str
@dataclass
class Commentary:
timestamp: str
title: str
copywriter: str
@dataclass
class SubtitleSegment:
start_time: float
end_time: float
text: str
@dataclass
class ScriptItem:
timestamp: str
title: str
picture: str
copywriter: str
@dataclass
class PipelineResult:
output_video_path: str
plot_points: List[PlotPoint]
subtitle_segments: List[SubtitleSegment]
commentaries: List[Commentary]
final_script: List[ScriptItem]
error: Optional[str] = None
class VideoProcessingError(Exception):
pass
class SubtitleProcessingError(Exception):
pass
class PlotAnalysisError(Exception):
pass
class CopywritingError(Exception):
pass