package constants // Token const ( CapabilityProductIngestToken = "A7f9KQ3mP2X8LZC4R5e" ) // Prompt const ( SystemPrompt = ` #你是一个专业的商品属性提取助手,你的任务是根据用户输入提取商品的属性信息。 1.最终输出格式为纯JSON字符串,键值对对应目标属性和提取到的属性值。 2.最终输出不要携带markdown标识,不要携带回车换行` ) // 商品属性模板-中文 const ( // 货易通商品属性模板-中文 HYTProductPropertyTemplateZH = `{ "条码": "string", // 商品编号 "分类名称": "string", // 商品分类 "货品名称": "string", // 商品名称 "货品编号": "string", // 商品编号 "商品货号": "string", // 商品编号 "品牌": "string", // 商品品牌 "单位": "string", // 商品单位,若无则使用'个' "规格参数": "string", // 商品规格参数 "货品说明": "string", // 商品说明 "保质期": "string", // 商品保质期 "保质期单位": "string", // 商品保质期单位 "链接": "string", // 商品链接 "货品图片": ["string"], // 商品多图,取1-2个即可 "电商销售价格": "string", // 商品电商销售价格 decimal(10,2) "销售价": "string", // 商品销售价格 decimal(10,2) "供应商报价": "string", // 商品供应商报价 decimal(10,2) "税率": "string", // 商品税率 x% "默认供应商": "string", // 供应商名称 "默认存放仓库": "string", // 仓库名称 "利润": "string", // 商品利润 decimal(10,2) "备注": "string", // 备注 "长": "string", // 商品长度,decimal(10,2)+单位 "宽": "string", // 商品宽度,decimal(10,2)+单位 "高": "string", // 商品高度,decimal(10,2)+单位 "重量": "string", // 商品重量(kg) "SPU名称": "string", // 商品SPU名称 "SPU编码": "string" // 编码串,jd_{timestamp}_rand(1000-999) }` ) // 商品属性模板 const ( HYTProductPropertyTemplate = `{ "important_data": { "type": "object", "properties": { "supplier_name": { "type": "string", "description": "供应商名称" }, "warehouse_name": { "type": "string", "description": "仓库名称" }, "profit": { "type": "float64", "description": "利润 decimal(10,2)" }, "tax_rate": { "type": "integer", "description": "税率 (x)%" } } }, "goods_info": { "type": "object", "properties": { "title": { "type": "string", "description": "商品名称" }, "brand": { "type": "string", "description": "品牌" }, "category": { "type": "string", "description": "分类" }, "price": { "type": "float64", "description": "市场价 decimal(10,2)" }, "sales_price": { "type": "float64", "description": "建议销售价 decimal(10,2)" }, "discount": { "type": "integer", "description": "折扣百分比 公式:(市场价-建议销售价)/市场价*100" }, "goods_attributes": { "type": "string", "description": "商品属性" }, "goods_bar_code": { "type": "string", "description": "商品条码" }, "goods_illustration": { "type": "string", "description": "商品插图" }, "goods_num": { "type": "string", "description": "商品编号" }, "introduction": { "type": "string", "description": "商品介绍" }, "spu_name": { "type": "string", "description": "SPU名称" }, "spu_num": { "type": "string", "description": "SPU编号" }, "stock": { "type": "integer", "description": "库存" }, "tax_rate": { "type": "integer", "description": "税率" }, "unit": { "type": "string", "description": "单位" }, "weight": { "type": "string", "description": "重量" } } }, "goods_media_list": { "type": "array", "description": "商品媒体文件列表", "items": { "type": "object", "properties": { "url": { "type": "string", "description": "媒体文件URL" }, "type": { "type": "integer", "description": "媒体类型(1:图片, 2:视频)" }, "sort": { "type": "integer", "description": "排序序号" } } } } }` ) // 外部平台地址 const ( HYTProductListPageURL = "https://gateway.dev.cdlsxd.cn/sw//#/goods/goodsManage" ) // 缓存key const ( CapabilityProductIngestCacheKey = "ai_scheduler:capability:product_ingest:%s" )