完成视频复刻和优化
This commit is contained in:
@@ -1571,7 +1571,10 @@ def stream_script_agent(
|
||||
target_index 非空 = 精准只改第 N 镜(读全脚本上下文,后端强制保留其余镜原样)。"""
|
||||
from apps.ai.services import create_ai_task, stream_routed_text_request
|
||||
|
||||
fmt, structure = coerce_combo(presentation_format, video_structure)
|
||||
# 极速成片与专业创作都只产出口播。历史项目、模板或请求里的短剧/Vlog
|
||||
# 仅作兼容读取,绝不能重新进入实际生成链路。
|
||||
del presentation_format
|
||||
fmt, structure = coerce_combo(DEFAULT_PRESENTATION_FORMAT, video_structure)
|
||||
|
||||
yield _sse({"type": "tool", "id": "skill", "label": f"加载套路:{PRESENTATION_FORMATS[fmt]} · {VIDEO_STRUCTURES[structure]}", "status": "running"})
|
||||
skill_loaded = bool(load_ecommerce_skill(fmt, structure))
|
||||
@@ -1898,7 +1901,8 @@ def regenerate_segment_via_agent(*, project, user, model_config: ModelConfig, se
|
||||
raise ValueError(f"镜号越界:第 {target_index + 1} 镜(共 {seg_n} 镜)")
|
||||
total_duration = base_draft["total_duration"] # 已按各镜真实秒数加总,normalize 不会截掉用户增删后的镜
|
||||
# 改一镜要沿用原稿的套路,否则重写出来的那一镜镜头语言会跟其余镜打架
|
||||
fmt, structure = combo_keys(base_draft.get("presentation_format"), base_draft.get("video_structure"))
|
||||
# 单镜重写也必须遵守当前统一的口播规则,不能被旧稿的表现形式带回短剧/Vlog。
|
||||
fmt, structure = combo_keys(DEFAULT_PRESENTATION_FORMAT, base_draft.get("video_structure"))
|
||||
|
||||
product_image_urls = _script_product_reference_urls(project, model_config)
|
||||
messages = build_agent_messages(
|
||||
|
||||
Reference in New Issue
Block a user