Upload latest code and optimized prompts (v6)
This commit is contained in:
119
schemas/brain-output.schema.json
Normal file
119
schemas/brain-output.schema.json
Normal file
@@ -0,0 +1,119 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "touchdog-brain-output",
|
||||
"title": "Touchdog Brain Output Schema",
|
||||
"description": "Brain决策层输出的图片规划数据结构",
|
||||
"type": "object",
|
||||
"required": ["analysis", "images"],
|
||||
"properties": {
|
||||
"analysis": {
|
||||
"type": "object",
|
||||
"description": "产品分析结果",
|
||||
"required": ["product_category", "core_selling_points", "background_strategy", "logo_color"],
|
||||
"properties": {
|
||||
"product_category": {
|
||||
"type": "string",
|
||||
"description": "产品品类英文名",
|
||||
"examples": ["Pet Recovery Cone", "Dog Harness", "Pet Bed"]
|
||||
},
|
||||
"core_selling_points": {
|
||||
"type": "array",
|
||||
"description": "选中的核心卖点key列表(3-4个)",
|
||||
"items": { "type": "string" },
|
||||
"minItems": 3,
|
||||
"maxItems": 4,
|
||||
"examples": [["lightweight", "waterproof", "breathable"]]
|
||||
},
|
||||
"background_strategy": {
|
||||
"type": "string",
|
||||
"description": "背景亮度策略",
|
||||
"enum": ["light", "dark", "mixed"]
|
||||
},
|
||||
"logo_color": {
|
||||
"type": "string",
|
||||
"description": "Logo颜色选择",
|
||||
"enum": ["red", "white"]
|
||||
},
|
||||
"visual_style": {
|
||||
"type": "string",
|
||||
"description": "整体视觉风格描述",
|
||||
"examples": ["Warm, caring home environment emphasizing comfort and ease"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"images": {
|
||||
"type": "array",
|
||||
"description": "12张图片的规划",
|
||||
"minItems": 12,
|
||||
"maxItems": 12,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["id", "type", "purpose", "layout_description", "ai_prompt", "logo_placement"],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "图片ID",
|
||||
"pattern": "^(Main_0[1-6]|APlus_0[1-6])$",
|
||||
"examples": ["Main_01", "APlus_01"]
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "图片类型",
|
||||
"examples": ["Hero Scene + Key Benefits", "Product Detail + Craftsmanship", "Competitor Comparison"]
|
||||
},
|
||||
"purpose": {
|
||||
"type": "string",
|
||||
"description": "这张图的营销目的(中文)",
|
||||
"examples": ["首图决定点击率,展示产品使用状态+核心卖点"]
|
||||
},
|
||||
"layout_description": {
|
||||
"type": "string",
|
||||
"description": "布局描述(中文,给人审核用)",
|
||||
"examples": ["上半部分:布偶猫佩戴冰蓝色伊丽莎白圈,在温馨的木质家居架子上。下半部分:浅蓝色圆弧Banner..."]
|
||||
},
|
||||
"ai_prompt": {
|
||||
"type": "string",
|
||||
"description": "完整的英文AI生图Prompt",
|
||||
"minLength": 100
|
||||
},
|
||||
"logo_placement": {
|
||||
"type": "object",
|
||||
"description": "Logo放置信息",
|
||||
"required": ["position", "type", "color"],
|
||||
"properties": {
|
||||
"position": {
|
||||
"type": "string",
|
||||
"description": "Logo位置",
|
||||
"enum": ["bottom-right", "bottom-left", "top-right", "top-left", "center", "none"]
|
||||
},
|
||||
"type": {
|
||||
"type": "string",
|
||||
"description": "Logo类型",
|
||||
"enum": ["combined", "graphic_only", "text_only", "none"]
|
||||
},
|
||||
"color": {
|
||||
"type": "string",
|
||||
"description": "Logo颜色",
|
||||
"enum": ["red", "white", "auto"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"aspect_ratio": {
|
||||
"type": "string",
|
||||
"description": "图片宽高比",
|
||||
"enum": ["1:1", "3:2"],
|
||||
"default": "1:1"
|
||||
},
|
||||
"is_comparison": {
|
||||
"type": "boolean",
|
||||
"description": "是否是竞品对比图",
|
||||
"default": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
219
schemas/sku-input.schema.json
Normal file
219
schemas/sku-input.schema.json
Normal file
@@ -0,0 +1,219 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$id": "touchdog-sku-input",
|
||||
"title": "Touchdog SKU Input Schema",
|
||||
"description": "用于AI电商图片生成的SKU输入数据结构",
|
||||
"type": "object",
|
||||
"required": ["sku_id", "product_name", "brand", "color", "selling_points", "specs", "ref_images"],
|
||||
"properties": {
|
||||
"sku_id": {
|
||||
"type": "string",
|
||||
"description": "SKU唯一标识符",
|
||||
"examples": ["TD-EC-001-IBLUE"]
|
||||
},
|
||||
"product_name": {
|
||||
"type": "string",
|
||||
"description": "产品英文名称",
|
||||
"examples": ["Cat Soft Cone Collar"]
|
||||
},
|
||||
"product_name_cn": {
|
||||
"type": "string",
|
||||
"description": "产品中文名称",
|
||||
"examples": ["伊丽莎白圈"]
|
||||
},
|
||||
"brand": {
|
||||
"type": "string",
|
||||
"description": "品牌名称",
|
||||
"const": "Touchdog"
|
||||
},
|
||||
"color": {
|
||||
"type": "object",
|
||||
"description": "颜色信息",
|
||||
"required": ["name", "hex"],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "颜色英文名",
|
||||
"examples": ["Ice Blue", "Mint Green", "Coral Pink"]
|
||||
},
|
||||
"name_cn": {
|
||||
"type": "string",
|
||||
"description": "颜色中文名",
|
||||
"examples": ["冰蓝色", "薄荷绿", "珊瑚粉"]
|
||||
},
|
||||
"series": {
|
||||
"type": "string",
|
||||
"description": "色系系列",
|
||||
"enum": ["Iridescent", "Solid", "Macaron", "Floral"],
|
||||
"examples": ["Iridescent"]
|
||||
},
|
||||
"hex": {
|
||||
"type": "string",
|
||||
"description": "主色HEX值",
|
||||
"pattern": "^#[0-9A-Fa-f]{6}$",
|
||||
"examples": ["#B0E0E6"]
|
||||
},
|
||||
"edge_color": {
|
||||
"type": "string",
|
||||
"description": "边缘包边颜色HEX值",
|
||||
"pattern": "^#[0-9A-Fa-f]{6}$",
|
||||
"examples": ["#7FDBDB"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"selling_points": {
|
||||
"type": "array",
|
||||
"description": "产品卖点列表",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["key", "title_en"],
|
||||
"properties": {
|
||||
"key": {
|
||||
"type": "string",
|
||||
"description": "卖点唯一标识",
|
||||
"examples": ["lightweight", "waterproof", "breathable", "adjustable", "wide_view", "foldable"]
|
||||
},
|
||||
"title_en": {
|
||||
"type": "string",
|
||||
"description": "卖点英文标题(用于图片显示)",
|
||||
"examples": ["LIGHTER THAN AN EGG", "WATERPROOF & EASY WIPE"]
|
||||
},
|
||||
"title_cn": {
|
||||
"type": "string",
|
||||
"description": "卖点中文标题",
|
||||
"examples": ["极致轻盈", "防水易清洁"]
|
||||
},
|
||||
"value": {
|
||||
"type": "string",
|
||||
"description": "具体数值(如有)",
|
||||
"examples": ["65g", "24.5cm"]
|
||||
},
|
||||
"description_en": {
|
||||
"type": "string",
|
||||
"description": "卖点英文描述",
|
||||
"examples": ["Cloud-light comfort, won't restrict pet activity"]
|
||||
},
|
||||
"description_cn": {
|
||||
"type": "string",
|
||||
"description": "卖点中文描述",
|
||||
"examples": ["云感舒适,不束缚宠物活动"]
|
||||
},
|
||||
"visual_prompt": {
|
||||
"type": "string",
|
||||
"description": "视觉化表达提示(用于AI生图)",
|
||||
"examples": ["product shown next to an egg for size comparison", "water droplets beading on the surface"]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"specs": {
|
||||
"type": "object",
|
||||
"description": "产品规格",
|
||||
"required": ["weight", "sizes"],
|
||||
"properties": {
|
||||
"weight": {
|
||||
"type": "string",
|
||||
"description": "产品重量",
|
||||
"examples": ["65g"]
|
||||
},
|
||||
"depth_cm": {
|
||||
"type": "string",
|
||||
"description": "圈深度(厘米)",
|
||||
"examples": ["24.5"]
|
||||
},
|
||||
"sizes": {
|
||||
"type": "array",
|
||||
"description": "可用尺码",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"enum": ["XS", "S", "M", "L", "XL"]
|
||||
},
|
||||
"examples": [["XS", "S", "M", "L", "XL"]]
|
||||
},
|
||||
"size_chart": {
|
||||
"type": "array",
|
||||
"description": "尺码对照表",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"size": { "type": "string" },
|
||||
"neck_range_cm": { "type": "string" },
|
||||
"neck_range_in": { "type": "string" },
|
||||
"depth_cm": { "type": "string" },
|
||||
"depth_in": { "type": "string" }
|
||||
}
|
||||
}
|
||||
},
|
||||
"materials": {
|
||||
"type": "object",
|
||||
"description": "材质信息",
|
||||
"properties": {
|
||||
"outer": {
|
||||
"type": "string",
|
||||
"description": "外层材质",
|
||||
"examples": ["Durable Waterproof PU"]
|
||||
},
|
||||
"inner": {
|
||||
"type": "string",
|
||||
"description": "内层材质",
|
||||
"examples": ["95% Cotton + 5% Spandex"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"use_cases": {
|
||||
"type": "array",
|
||||
"description": "使用场景列表",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": ["name_en"],
|
||||
"properties": {
|
||||
"name_en": {
|
||||
"type": "string",
|
||||
"description": "场景英文名",
|
||||
"examples": ["Postoperative Care", "Eye Drop Application", "Nail Trimming", "Grooming"]
|
||||
},
|
||||
"name_cn": {
|
||||
"type": "string",
|
||||
"description": "场景中文名",
|
||||
"examples": ["术后恢复", "驱虫护理", "指甲修剪", "美容护理"]
|
||||
},
|
||||
"visual_prompt": {
|
||||
"type": "string",
|
||||
"description": "场景视觉化提示",
|
||||
"examples": ["cat resting comfortably after surgery wearing the cone"]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"ref_images": {
|
||||
"type": "array",
|
||||
"description": "参考图片URLs(用于产品一致性约束)",
|
||||
"minItems": 1,
|
||||
"items": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
},
|
||||
"examples": [
|
||||
["https://r2.example.com/td-ec-001-flat.jpg", "https://r2.example.com/td-ec-001-worn.jpg"]
|
||||
]
|
||||
},
|
||||
"pet_type": {
|
||||
"type": "string",
|
||||
"description": "适用宠物类型",
|
||||
"enum": ["cat", "dog", "both"],
|
||||
"default": "cat"
|
||||
},
|
||||
"target_market": {
|
||||
"type": "string",
|
||||
"description": "目标市场",
|
||||
"enum": ["us", "eu", "global"],
|
||||
"default": "global"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user