feat(04-03): add AnalyzeInput and AnalyzeOutput schemas
- AnalyzeInput extends StepInput with metadata_file, content_file, content_type, output_file - AnalyzeOutput extends StepOutput with analysis_file, summary, main_topics, key_insights, tags, stats - Supports both video and article content types Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -310,3 +310,46 @@ class DownloadOutput(StepOutput):
|
|||||||
title: str = Field(..., description="Content title")
|
title: str = Field(..., description="Content title")
|
||||||
author: str = Field(..., description="Content author")
|
author: str = Field(..., description="Content author")
|
||||||
duration: Optional[int] = Field(None, description="Duration for video content in seconds")
|
duration: Optional[int] = Field(None, description="Duration for video content in seconds")
|
||||||
|
|
||||||
|
|
||||||
|
# =============================================================================
|
||||||
|
# Analyze Schemas (Phase 04)
|
||||||
|
# =============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
class AnalyzeInput(StepInput):
|
||||||
|
"""Analyze 步骤输入
|
||||||
|
|
||||||
|
继承 StepInput 的基础字段,添加分析特定字段。
|
||||||
|
|
||||||
|
Attributes:
|
||||||
|
metadata_file: 元数据 JSON 文件路径
|
||||||
|
content_file: 内容文件路径(字幕 JSON 或文章内容)
|
||||||
|
content_type: 内容类型(video 或 article)
|
||||||
|
output_file: 输出分析 Markdown 文件路径
|
||||||
|
"""
|
||||||
|
metadata_file: str = Field(..., min_length=1, description="Path to metadata JSON file")
|
||||||
|
content_file: str = Field(..., min_length=1, description="Path to content file (subtitle JSON or article content)")
|
||||||
|
content_type: str = Field(..., min_length=1, description="Content type (video or article)")
|
||||||
|
output_file: str = Field(..., min_length=1, description="Path to output analysis Markdown file")
|
||||||
|
|
||||||
|
|
||||||
|
class AnalyzeOutput(StepOutput):
|
||||||
|
"""Analyze 步骤输出
|
||||||
|
|
||||||
|
继承 StepOutput 的基础字段,添加分析特定字段。
|
||||||
|
|
||||||
|
Attributes:
|
||||||
|
analysis_file: 生成的分析报告文件路径
|
||||||
|
summary: 内容摘要
|
||||||
|
main_topics: 提取的主要主题列表
|
||||||
|
key_insights: 关键见解列表
|
||||||
|
tags: 推荐标签列表
|
||||||
|
stats: 分析统计信息字典
|
||||||
|
"""
|
||||||
|
analysis_file: str = Field(..., description="Path to generated analysis report")
|
||||||
|
summary: str = Field(default="", description="Content summary")
|
||||||
|
main_topics: List[str] = Field(default_factory=list, description="Main topics extracted")
|
||||||
|
key_insights: List[str] = Field(default_factory=list, description="Key insights")
|
||||||
|
tags: List[str] = Field(default_factory=list, description="Recommended tags")
|
||||||
|
stats: Dict[str, Any] = Field(default_factory=dict, description="Statistics about analysis")
|
||||||
|
|||||||
Reference in New Issue
Block a user