feat: add props system and refactor asset library architecture
This commit is contained in:
@@ -9,6 +9,8 @@ Inputs:
|
||||
{locations_description}
|
||||
- Character context:
|
||||
{characters_info}
|
||||
- Prop context:
|
||||
{props_description}
|
||||
|
||||
Output format (JSON array only):
|
||||
[
|
||||
|
||||
@@ -119,6 +119,9 @@
|
||||
角色信息:
|
||||
{characters_info}
|
||||
|
||||
道具描述:
|
||||
{props_description}
|
||||
|
||||
【严格要求】
|
||||
|
||||
1. 只返回JSON数组,不要有markdown代码块标记
|
||||
@@ -131,4 +134,3 @@
|
||||
8. 如果镜头涉及不同场景,灯光和色调要相应调整
|
||||
9. 输出要简洁,每个镜头的规则独立完整
|
||||
10. ⚠️ JSON安全:所有引号(""''等)在 JSON 字符串值中必须统一替换为「」,严禁出现未转义的英文双引号 "
|
||||
|
||||
|
||||
@@ -20,7 +20,8 @@ Output format (JSON array only):
|
||||
"end": "exact end snippet from source text (>=5 chars)",
|
||||
"summary": "short clip summary",
|
||||
"location": "best matched location name",
|
||||
"characters": ["Character A", "Character B"]
|
||||
"characters": ["Character A", "Character B"],
|
||||
"props": ["Prop A", "Prop B"]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -28,6 +29,9 @@ Rules:
|
||||
1. Keep clips contiguous, ordered, and fully covering the source text.
|
||||
2. Prefer natural scene/drama boundaries.
|
||||
3. Minimize over-splitting.
|
||||
4. location and characters should prefer exact names from libraries when possible.
|
||||
4. location, characters, and props should prefer exact names from libraries when possible.
|
||||
5. Return JSON only, no markdown or extra text.
|
||||
6. ⚠️ JSON SAFETY: All quotation marks in dialogue (""''「」 etc.) MUST be converted to corner brackets「」in JSON string values. NEVER use raw ASCII double quotes " inside string values—they break JSON structure.
|
||||
|
||||
Prop library:
|
||||
{props_lib_name}
|
||||
|
||||
@@ -8,7 +8,8 @@
|
||||
"end": 结束文本,最少包含五个字,
|
||||
"summary": "总结概括片段内容",
|
||||
"location": "场景发生位置",
|
||||
"characters": ["角色1", "角色2"]
|
||||
"characters": ["角色1", "角色2"],
|
||||
"props": ["道具1", "道具2"]
|
||||
}
|
||||
]
|
||||
|
||||
@@ -68,8 +69,14 @@
|
||||
3. 例如角色库有"张三",原文写"老张"或"张总",必须填写"张三"
|
||||
4. ⭐ 参考【角色介绍】理解"我"对应哪个角色,以及其他称呼的映射关系
|
||||
|
||||
【props 道具选择 - 必须100%精确匹配】
|
||||
1. props 数组【只能】填写道具库中【完全一模一样】的名字
|
||||
2. ❌ 严禁改写、缩写、添加前后缀
|
||||
3. 只选择当前片段里真正出镜、被持有、被使用、被重点提及的实体道具
|
||||
4. 如果当前片段没有明确道具,返回空数组 []
|
||||
|
||||
【自检规则】
|
||||
输出前检查:location 和 characters 中的每个名字是否都能在场景库/角色库中找到完全一致的?如果不能,必须修正!
|
||||
输出前检查:location、characters、props 中的每个名字是否都能在对应资产库中找到完全一致的?如果不能,必须修正!
|
||||
|
||||
原文如下:
|
||||
{input}
|
||||
@@ -81,4 +88,7 @@
|
||||
{characters_lib_name}
|
||||
|
||||
角色介绍(⭐用于理解"我"和称呼对应的角色):
|
||||
{characters_introduction}
|
||||
{characters_introduction}
|
||||
|
||||
道具库:
|
||||
{props_lib_name}
|
||||
|
||||
@@ -165,6 +165,9 @@
|
||||
场景描述:
|
||||
{locations_description}
|
||||
|
||||
道具描述:
|
||||
{props_description}
|
||||
|
||||
【严格要求】
|
||||
1. 为每个分镜补充shot_type、camera_move、video_prompt
|
||||
2. shot_type格式:视角+景别(如"平视中景"、"越肩近景"、"仰拍全景")
|
||||
@@ -178,4 +181,3 @@
|
||||
10. description可以适当优化,但不要改变核心内容
|
||||
11. ⚠️ 必须保留输入分镜中的 source_text 字段,原样输出到结果中,不得遗漏或修改
|
||||
12. ⚠️ JSON安全:所有引号(""''等)在 JSON 字符串值中必须统一替换为「」,严禁出现未转义的英文双引号 "
|
||||
|
||||
|
||||
@@ -24,6 +24,9 @@
|
||||
## 场景信息(仅包含前后镜头涉及的场景)
|
||||
{locations_description}
|
||||
|
||||
## 道具信息(仅包含前后镜头涉及的道具)
|
||||
{props_description}
|
||||
|
||||
======================================
|
||||
【分析规则】
|
||||
======================================
|
||||
|
||||
@@ -16,6 +16,9 @@ Character appearance list:
|
||||
Character full descriptions:
|
||||
{characters_full_description}
|
||||
|
||||
Prop descriptions:
|
||||
{props_description}
|
||||
|
||||
Clip metadata JSON:
|
||||
{clip_json}
|
||||
|
||||
|
||||
@@ -301,6 +301,9 @@
|
||||
角色完整描述(供参考):
|
||||
{characters_full_description}
|
||||
|
||||
道具描述(供参考):
|
||||
{props_description}
|
||||
|
||||
Clip信息:
|
||||
{clip_json}
|
||||
|
||||
|
||||
30
lib/prompts/novel-promotion/select_prop.en.txt
Normal file
30
lib/prompts/novel-promotion/select_prop.en.txt
Normal file
@@ -0,0 +1,30 @@
|
||||
You are a prop asset extractor.
|
||||
|
||||
Task: identify reusable physical props from the input text and return JSON only.
|
||||
|
||||
Output format:
|
||||
{
|
||||
"props": [
|
||||
{
|
||||
"name": "prop name",
|
||||
"summary": "one-line objective prop description"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Rules:
|
||||
1. Only include concrete reusable physical props that actually appear in the story.
|
||||
2. Only output `name` and `summary`.
|
||||
3. `name` and `summary` must both be non-empty.
|
||||
4. Do not repeat props that already exist in the prop library with the exact same name.
|
||||
5. Exclude abstract concepts, powers, roles, places, creatures, outfits, and makeup.
|
||||
6. Keep names stable and short.
|
||||
7. Keep summaries objective.
|
||||
8. If none exist, return {"props": []}.
|
||||
9. Replace raw quotation marks inside JSON string values with corner brackets「」.
|
||||
|
||||
Input:
|
||||
{input}
|
||||
|
||||
Existing prop library:
|
||||
{props_lib_name}
|
||||
30
lib/prompts/novel-promotion/select_prop.zh.txt
Normal file
30
lib/prompts/novel-promotion/select_prop.zh.txt
Normal file
@@ -0,0 +1,30 @@
|
||||
你是“故事道具资产分析师”。
|
||||
|
||||
任务:从输入文本中识别适合做成长期复用资产的道具,只返回 JSON,不得包含任何额外解释或 markdown。
|
||||
|
||||
输出格式:
|
||||
{
|
||||
"props": [
|
||||
{
|
||||
"name": "道具名称",
|
||||
"summary": "一句话描述道具的外观/用途"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
规则:
|
||||
1. 只保留在剧情中真实出现、可被反复引用、值得进入资产库的实体道具。
|
||||
2. 只输出两个字段:name、summary。
|
||||
3. name 不能为空;summary 不能为空。
|
||||
4. 如果道具库里已经有完全同名道具,不要重复输出。
|
||||
5. 禁止输出抽象概念、情绪、能力、身份、地点、生物、服装妆容。
|
||||
6. 名称尽量简洁稳定,例如“青铜匕首”“录音笔”“红绳手链”。
|
||||
7. summary 只写客观描述,不写剧情推断。
|
||||
8. 如果没有合适道具,返回 {"props": []}。
|
||||
9. JSON 字符串值中的引号统一替换为「」。
|
||||
|
||||
输入文本:
|
||||
{input}
|
||||
|
||||
已有道具库:
|
||||
{props_lib_name}
|
||||
Reference in New Issue
Block a user