Upload latest code and optimized prompts (v6)

This commit is contained in:
tony
2025-12-14 19:52:54 +08:00
commit f5cb1042ae
42 changed files with 15302 additions and 0 deletions

View 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"
}
}
}