Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ea60d4b4c6 | |||
| e572fbb29b | |||
| 5273cf6f03 | |||
| 3f7a5dd5a1 |
134
app.py
134
app.py
@@ -101,64 +101,70 @@ def save_data(file_path, data):
|
||||
|
||||
# ============ 大模型智能解析 ============
|
||||
|
||||
def parse_with_llm(text, category_type, images=None):
|
||||
def parse_with_llm(text, category_type, images=None, category_id=None, subcategory_id=None):
|
||||
"""
|
||||
使用大模型解析文本/图片,提取结构化数据
|
||||
支持多张图片输入,可能解析出多个产品
|
||||
根据类别配置的参数字段进行解析
|
||||
"""
|
||||
|
||||
# 根据类型定义字段模板
|
||||
field_templates = {
|
||||
'model': {
|
||||
'name': '模型名称',
|
||||
'organization': '厂商/组织',
|
||||
'parameters': '参数量(数字,单位B)',
|
||||
'context_length': '上下文长度(数字)',
|
||||
'architecture': '架构类型',
|
||||
'is_open_source': '是否开源(true/false)',
|
||||
'mmlu': 'MMLU分数(数字)',
|
||||
'input_price': '输入价格(数字)',
|
||||
'output_price': '输出价格(数字)',
|
||||
'license': '许可证',
|
||||
'description': '简介描述',
|
||||
},
|
||||
'gpu': {
|
||||
'name': 'GPU名称',
|
||||
'manufacturer': '厂商',
|
||||
'architecture': '架构',
|
||||
'memory_gb': '显存大小(数字,单位GB)',
|
||||
'cuda_cores': 'CUDA核心数(数字)',
|
||||
'tensor_cores': 'Tensor核心数(数字)',
|
||||
'memory_bandwidth_gbs': '显存带宽(数字,单位GB/s)',
|
||||
'fp16_tflops': 'FP16性能(数字,单位TF)',
|
||||
'price_usd': '价格(数字)',
|
||||
'release_year': '发布年份(数字)',
|
||||
'description': '简介描述',
|
||||
},
|
||||
'cpu': {
|
||||
'name': 'CPU名称',
|
||||
'manufacturer': '厂商',
|
||||
'architecture': '架构',
|
||||
'cores': '核心数(数字)',
|
||||
'threads': '线程数(数字)',
|
||||
'base_clock_ghz': '基础频率(数字,单位GHz)',
|
||||
'boost_clock_ghz': '加速频率(数字,单位GHz)',
|
||||
'l3_cache_mb': 'L3缓存(数字,单位MB)',
|
||||
'tdp_watts': 'TDP功耗(数字,单位W)',
|
||||
'price_usd': '价格(数字)',
|
||||
'description': '简介描述',
|
||||
},
|
||||
'dynamic': {
|
||||
# 从类别配置中获取字段定义
|
||||
categories = load_data(CATEGORIES_FILE)
|
||||
|
||||
# 确定类别ID
|
||||
if category_id:
|
||||
cat = next((c for c in categories if c['id'] == category_id), None)
|
||||
else:
|
||||
# 根据类型映射到内置类别ID
|
||||
type_to_cat_id = {'model': 'ai-models', 'gpu': 'gpus', 'cpu': 'cpus'}
|
||||
cat_id = type_to_cat_id.get(category_type)
|
||||
cat = next((c for c in categories if c['id'] == cat_id), None)
|
||||
|
||||
# 构建字段模板
|
||||
fields = {}
|
||||
|
||||
if cat and 'fields' in cat:
|
||||
# 使用类别配置的字段
|
||||
for field in cat['fields']:
|
||||
field_desc = field['label']
|
||||
if field['type'] == 'number':
|
||||
field_desc += '(数字)'
|
||||
elif field['type'] == 'boolean':
|
||||
field_desc += '(true/false)'
|
||||
elif field['type'] == 'date':
|
||||
field_desc += '(日期格式YYYY-MM-DD)'
|
||||
elif field['type'] == 'json':
|
||||
field_desc += '(JSON对象)'
|
||||
if field.get('description'):
|
||||
field_desc += f" - {field['description']}"
|
||||
fields[field['key']] = field_desc
|
||||
|
||||
# 如果有子类别,添加子类别的额外字段
|
||||
if subcategory_id:
|
||||
subcat = next((s for s in cat.get('subcategories', []) if s['id'] == subcategory_id), None)
|
||||
if subcat and 'extra_fields' in subcat:
|
||||
for field in subcat['extra_fields']:
|
||||
field_desc = field['label']
|
||||
if field['type'] == 'number':
|
||||
field_desc += '(数字)'
|
||||
elif field['type'] == 'boolean':
|
||||
field_desc += '(true/false)'
|
||||
elif field['type'] == 'date':
|
||||
field_desc += '(日期格式YYYY-MM-DD)'
|
||||
if field.get('description'):
|
||||
field_desc += f" - {field['description']}"
|
||||
fields[field['key']] = field_desc
|
||||
else:
|
||||
# 兜底:使用默认字段模板
|
||||
fields = {
|
||||
'name': '名称',
|
||||
'brand': '品牌',
|
||||
'price': '价格(数字)',
|
||||
'year': '年份(数字)',
|
||||
'specs': '规格参数',
|
||||
'specs': '规格参数(JSON对象)',
|
||||
'description': '简介描述',
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
fields = field_templates.get(category_type, field_templates['dynamic'])
|
||||
fields_json = json.dumps(fields, ensure_ascii=False, indent=2)
|
||||
|
||||
# 构建消息内容
|
||||
@@ -498,11 +504,13 @@ def api_parse_images():
|
||||
"""
|
||||
解析图片中的产品参数(预览模式,不保存)
|
||||
支持多张图片,可能返回多个产品
|
||||
根据类别配置的参数字段进行解析
|
||||
"""
|
||||
data = request.get_json()
|
||||
text = data.get('text', '')
|
||||
images = data.get('images', [])
|
||||
category_type = data.get('category_type', 'dynamic')
|
||||
subcategory_id = data.get('subcategory_id', '')
|
||||
|
||||
if not text and not images:
|
||||
return jsonify({'error': '文本或图片不能都为空'}), 400
|
||||
@@ -510,8 +518,12 @@ def api_parse_images():
|
||||
if not images:
|
||||
return jsonify({'error': '请上传至少一张图片'}), 400
|
||||
|
||||
# 调用大模型解析
|
||||
parsed_list = parse_with_llm(text, category_type, images)
|
||||
# 确定类别ID
|
||||
type_to_cat_id = {'model': 'ai-models', 'gpu': 'gpus', 'cpu': 'cpus', 'dynamic': None}
|
||||
category_id = type_to_cat_id.get(category_type)
|
||||
|
||||
# 调用大模型解析(根据类别字段配置)
|
||||
parsed_list = parse_with_llm(text, category_type, images, category_id=category_id, subcategory_id=subcategory_id)
|
||||
|
||||
return jsonify({
|
||||
'success': True,
|
||||
@@ -691,12 +703,13 @@ def api_smart_add_model():
|
||||
data = request.get_json()
|
||||
text = data.get('text', '')
|
||||
images = data.get('images', [])
|
||||
subcategory_id = data.get('subcategory_id', '') # 子类别ID
|
||||
|
||||
if not text and not images:
|
||||
return jsonify({'error': '文本或图片不能都为空'}), 400
|
||||
|
||||
# 大模型解析(支持多图)
|
||||
parsed_list = parse_with_llm(text, 'model', images)
|
||||
# 大模型解析(根据类别字段配置)
|
||||
parsed_list = parse_with_llm(text, 'model', images, category_id='ai-models', subcategory_id=subcategory_id)
|
||||
|
||||
# 处理多个产品
|
||||
results = []
|
||||
@@ -707,8 +720,9 @@ def api_smart_add_model():
|
||||
parsed['id'] = uuid.uuid4().hex[:12]
|
||||
parsed['created_at'] = datetime.now().strftime('%Y-%m-%d %H:%M:%S')
|
||||
parsed['visible'] = True
|
||||
parsed['raw_text'] = text # 保存原始文本
|
||||
parsed['images'] = images # 保存图片
|
||||
parsed['raw_text'] = text
|
||||
parsed['images'] = images
|
||||
parsed['subcategory_id'] = subcategory_id # 保存子类别
|
||||
parsed['publish_date'] = parsed.get('publish_date', '')
|
||||
parsed['views'] = 0
|
||||
parsed['is_pinned'] = False
|
||||
@@ -718,7 +732,6 @@ def api_smart_add_model():
|
||||
|
||||
save_data(MODELS_FILE, models)
|
||||
|
||||
# 返回添加的产品列表
|
||||
return jsonify({'success': True, 'count': len(results), 'products': results})
|
||||
|
||||
@app.route('/api/gpus/smart-add', methods=['POST'])
|
||||
@@ -727,11 +740,12 @@ def api_smart_add_gpu():
|
||||
data = request.get_json()
|
||||
text = data.get('text', '')
|
||||
images = data.get('images', [])
|
||||
subcategory_id = data.get('subcategory_id', '')
|
||||
|
||||
if not text and not images:
|
||||
return jsonify({'error': '文本或图片不能都为空'}), 400
|
||||
|
||||
parsed_list = parse_with_llm(text, 'gpu', images)
|
||||
parsed_list = parse_with_llm(text, 'gpu', images, category_id='gpus', subcategory_id=subcategory_id)
|
||||
|
||||
results = []
|
||||
gpus = load_data(GPUS_FILE)
|
||||
@@ -742,6 +756,7 @@ def api_smart_add_gpu():
|
||||
parsed['visible'] = True
|
||||
parsed['raw_text'] = text
|
||||
parsed['images'] = images
|
||||
parsed['subcategory_id'] = subcategory_id
|
||||
parsed['publish_date'] = parsed.get('publish_date', '')
|
||||
parsed['views'] = 0
|
||||
parsed['is_pinned'] = False
|
||||
@@ -759,11 +774,12 @@ def api_smart_add_cpu():
|
||||
data = request.get_json()
|
||||
text = data.get('text', '')
|
||||
images = data.get('images', [])
|
||||
subcategory_id = data.get('subcategory_id', '')
|
||||
|
||||
if not text and not images:
|
||||
return jsonify({'error': '文本或图片不能都为空'}), 400
|
||||
|
||||
parsed_list = parse_with_llm(text, 'cpu', images)
|
||||
parsed_list = parse_with_llm(text, 'cpu', images, category_id='cpus', subcategory_id=subcategory_id)
|
||||
|
||||
results = []
|
||||
cpus = load_data(CPUS_FILE)
|
||||
@@ -774,6 +790,7 @@ def api_smart_add_cpu():
|
||||
parsed['visible'] = True
|
||||
parsed['raw_text'] = text
|
||||
parsed['images'] = images
|
||||
parsed['subcategory_id'] = subcategory_id
|
||||
parsed['publish_date'] = parsed.get('publish_date', '')
|
||||
parsed['views'] = 0
|
||||
parsed['is_pinned'] = False
|
||||
@@ -791,11 +808,13 @@ def api_smart_add_item(category_id):
|
||||
data = request.get_json()
|
||||
text = data.get('text', '')
|
||||
images = data.get('images', [])
|
||||
subcategory_id = data.get('subcategory_id', '')
|
||||
|
||||
if not text and not images:
|
||||
return jsonify({'error': '文本或图片不能都为空'}), 400
|
||||
|
||||
parsed_list = parse_with_llm(text, 'dynamic', images)
|
||||
# 使用类别配置的字段解析
|
||||
parsed_list = parse_with_llm(text, 'dynamic', images, category_id=category_id, subcategory_id=subcategory_id)
|
||||
|
||||
results = []
|
||||
items_file = DATA_DIR / f'items_{category_id}.json'
|
||||
@@ -808,6 +827,7 @@ def api_smart_add_item(category_id):
|
||||
parsed['visible'] = True
|
||||
parsed['raw_text'] = text
|
||||
parsed['images'] = images
|
||||
parsed['subcategory_id'] = subcategory_id
|
||||
parsed['publish_date'] = parsed.get('publish_date', '')
|
||||
parsed['views'] = 0
|
||||
parsed['is_pinned'] = False
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
"mmlu": "MMLU",
|
||||
"input_price": "输入价",
|
||||
"output_price": "输出价"
|
||||
}
|
||||
},
|
||||
"extra_fields": []
|
||||
},
|
||||
{
|
||||
"id": "code",
|
||||
@@ -37,7 +38,8 @@
|
||||
"humaneval": "HumanEval",
|
||||
"context_length": "上下文",
|
||||
"input_price": "输入价"
|
||||
}
|
||||
},
|
||||
"extra_fields": []
|
||||
},
|
||||
{
|
||||
"id": "reasoning",
|
||||
@@ -52,7 +54,23 @@
|
||||
"reasoning_capability": "推理能力",
|
||||
"mmlu": "MMLU",
|
||||
"context_length": "上下文"
|
||||
}
|
||||
},
|
||||
"extra_fields": [
|
||||
{
|
||||
"key": "reasoning_capability",
|
||||
"label": "推理能力",
|
||||
"type": "boolean",
|
||||
"description": "是否专门推理模型",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "thinking_mode",
|
||||
"label": "思考模式",
|
||||
"type": "text",
|
||||
"description": "思考模式类型",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "vision",
|
||||
@@ -67,7 +85,123 @@
|
||||
"vision_capability": "视觉能力",
|
||||
"multimodal": "多模态",
|
||||
"context_length": "上下文"
|
||||
}
|
||||
},
|
||||
"extra_fields": [
|
||||
{
|
||||
"key": "vision_capability",
|
||||
"label": "视觉能力",
|
||||
"type": "boolean",
|
||||
"description": "是否支持图像输入",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "multimodal",
|
||||
"label": "多模态",
|
||||
"type": "boolean",
|
||||
"description": "是否多模态模型",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"key": "name",
|
||||
"label": "名称",
|
||||
"type": "text",
|
||||
"description": "模型名称",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"key": "organization",
|
||||
"label": "厂商",
|
||||
"type": "text",
|
||||
"description": "开发公司/组织",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"key": "parameters",
|
||||
"label": "参数量(B)",
|
||||
"type": "number",
|
||||
"description": "模型参数量,单位B(十亿)",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"key": "architecture",
|
||||
"label": "架构",
|
||||
"type": "text",
|
||||
"description": "模型架构,如Transformer、MoE",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "context_length",
|
||||
"label": "上下文长度",
|
||||
"type": "number",
|
||||
"description": "最大上下文窗口",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "is_open_source",
|
||||
"label": "开源",
|
||||
"type": "boolean",
|
||||
"description": "是否开源模型",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "mmlu",
|
||||
"label": "MMLU分数",
|
||||
"type": "number",
|
||||
"description": "MMLU基准测试分数",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "humaneval",
|
||||
"label": "HumanEval分数",
|
||||
"type": "number",
|
||||
"description": "HumanEval代码能力分数",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "input_price",
|
||||
"label": "输入价格($/1K)",
|
||||
"type": "number",
|
||||
"description": "每1K输入token价格",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "output_price",
|
||||
"label": "输出价格($/1K)",
|
||||
"type": "number",
|
||||
"description": "每1K输出token价格",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "license",
|
||||
"label": "许可证",
|
||||
"type": "text",
|
||||
"description": "使用许可证类型",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "publish_date",
|
||||
"label": "发布日期",
|
||||
"type": "date",
|
||||
"description": "模型发布日期",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "description",
|
||||
"label": "描述",
|
||||
"type": "text",
|
||||
"description": "模型简介",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "views",
|
||||
"label": "热度",
|
||||
"type": "number",
|
||||
"description": "浏览次数",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -94,7 +228,8 @@
|
||||
"cuda_cores": "CUDA核心",
|
||||
"price_usd": "价格",
|
||||
"fp16_tflops": "FP16性能"
|
||||
}
|
||||
},
|
||||
"extra_fields": []
|
||||
},
|
||||
{
|
||||
"id": "professional",
|
||||
@@ -111,7 +246,8 @@
|
||||
"tensor_cores": "Tensor核心",
|
||||
"memory_bandwidth_gbs": "带宽",
|
||||
"price_usd": "价格"
|
||||
}
|
||||
},
|
||||
"extra_fields": []
|
||||
},
|
||||
{
|
||||
"id": "datacenter",
|
||||
@@ -128,7 +264,144 @@
|
||||
"tensor_cores": "Tensor核心",
|
||||
"memory_bandwidth_gbs": "带宽",
|
||||
"fp16_tflops": "FP16性能"
|
||||
}
|
||||
},
|
||||
"extra_fields": [
|
||||
{
|
||||
"key": "nvlink",
|
||||
"label": "NVLink",
|
||||
"type": "boolean",
|
||||
"description": "是否支持NVLink互联",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "multi_instance",
|
||||
"label": "MIG",
|
||||
"type": "boolean",
|
||||
"description": "是否支持多实例GPU",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"key": "name",
|
||||
"label": "名称",
|
||||
"type": "text",
|
||||
"description": "GPU名称",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"key": "manufacturer",
|
||||
"label": "厂商",
|
||||
"type": "text",
|
||||
"description": "制造商",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"key": "architecture",
|
||||
"label": "架构",
|
||||
"type": "text",
|
||||
"description": "GPU架构,如Ampere、Hopper",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "memory_gb",
|
||||
"label": "显存(GB)",
|
||||
"type": "number",
|
||||
"description": "显存容量",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"key": "cuda_cores",
|
||||
"label": "CUDA核心",
|
||||
"type": "number",
|
||||
"description": "CUDA核心数量",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "tensor_cores",
|
||||
"label": "Tensor核心",
|
||||
"type": "number",
|
||||
"description": "Tensor核心数量",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "memory_bandwidth_gbs",
|
||||
"label": "显存带宽(GB/s)",
|
||||
"type": "number",
|
||||
"description": "显存带宽",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "fp32_tflops",
|
||||
"label": "FP32性能(TF)",
|
||||
"type": "number",
|
||||
"description": "FP32浮点性能",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "fp16_tflops",
|
||||
"label": "FP16性能(TF)",
|
||||
"type": "number",
|
||||
"description": "FP16半精度性能",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "int8_perf_tops",
|
||||
"label": "INT8性能(TOPS)",
|
||||
"type": "number",
|
||||
"description": "INT8整数性能",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "price_usd",
|
||||
"label": "价格($)",
|
||||
"type": "number",
|
||||
"description": "参考价格(美元)",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "currency",
|
||||
"label": "币种",
|
||||
"type": "text",
|
||||
"description": "价格币种",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "min_price",
|
||||
"label": "最低价",
|
||||
"type": "number",
|
||||
"description": "最低价格",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "max_price",
|
||||
"label": "最高价",
|
||||
"type": "number",
|
||||
"description": "最高价格",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "price_unit",
|
||||
"label": "价格单位",
|
||||
"type": "text",
|
||||
"description": "价格单位,如万",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "release_year",
|
||||
"label": "发布年份",
|
||||
"type": "number",
|
||||
"description": "发布年份",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "description",
|
||||
"label": "描述",
|
||||
"type": "text",
|
||||
"description": "GPU简介",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -155,7 +428,8 @@
|
||||
"threads": "线程",
|
||||
"boost_clock_ghz": "加速频率",
|
||||
"price_usd": "价格"
|
||||
}
|
||||
},
|
||||
"extra_fields": []
|
||||
},
|
||||
{
|
||||
"id": "server",
|
||||
@@ -172,7 +446,23 @@
|
||||
"threads": "线程",
|
||||
"l3_cache_mb": "L3缓存",
|
||||
"tdp_watts": "功耗"
|
||||
}
|
||||
},
|
||||
"extra_fields": [
|
||||
{
|
||||
"key": "pcie_gen",
|
||||
"label": "PCIe版本",
|
||||
"type": "number",
|
||||
"description": "PCIe代数",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "max_memory",
|
||||
"label": "最大内存(GB)",
|
||||
"type": "number",
|
||||
"description": "支持最大内存容量",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "mobile",
|
||||
@@ -189,7 +479,116 @@
|
||||
"threads": "线程",
|
||||
"base_clock_ghz": "基础频率",
|
||||
"tdp_watts": "功耗"
|
||||
}
|
||||
},
|
||||
"extra_fields": [
|
||||
{
|
||||
"key": "integrated_gpu",
|
||||
"label": "集成显卡",
|
||||
"type": "text",
|
||||
"description": "集成GPU型号",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "tdp_range",
|
||||
"label": "功耗范围(W)",
|
||||
"type": "text",
|
||||
"description": "功耗范围",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"key": "name",
|
||||
"label": "名称",
|
||||
"type": "text",
|
||||
"description": "CPU名称",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"key": "manufacturer",
|
||||
"label": "厂商",
|
||||
"type": "text",
|
||||
"description": "制造商",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"key": "architecture",
|
||||
"label": "架构",
|
||||
"type": "text",
|
||||
"description": "CPU架构,如Zen 4",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "cores",
|
||||
"label": "核心数",
|
||||
"type": "number",
|
||||
"description": "物理核心数",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"key": "threads",
|
||||
"label": "线程数",
|
||||
"type": "number",
|
||||
"description": "逻辑线程数",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"key": "base_clock_ghz",
|
||||
"label": "基础频率(GHz)",
|
||||
"type": "number",
|
||||
"description": "基础频率",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "boost_clock_ghz",
|
||||
"label": "加速频率(GHz)",
|
||||
"type": "number",
|
||||
"description": "加速频率",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "l3_cache_mb",
|
||||
"label": "L3缓存(MB)",
|
||||
"type": "number",
|
||||
"description": "三级缓存大小",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "tdp_watts",
|
||||
"label": "TDP功耗(W)",
|
||||
"type": "number",
|
||||
"description": "热设计功耗",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "price_usd",
|
||||
"label": "价格($)",
|
||||
"type": "number",
|
||||
"description": "参考价格(美元)",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "currency",
|
||||
"label": "币种",
|
||||
"type": "text",
|
||||
"description": "价格币种",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "release_year",
|
||||
"label": "发布年份",
|
||||
"type": "number",
|
||||
"description": "发布年份",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "description",
|
||||
"label": "描述",
|
||||
"type": "text",
|
||||
"description": "CPU简介",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -236,6 +635,78 @@
|
||||
"price": "价格"
|
||||
}
|
||||
}
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"key": "name",
|
||||
"label": "名称",
|
||||
"type": "text",
|
||||
"description": "手机型号",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"key": "brand",
|
||||
"label": "品牌",
|
||||
"type": "text",
|
||||
"description": "手机品牌",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"key": "processor",
|
||||
"label": "处理器",
|
||||
"type": "text",
|
||||
"description": "CPU型号",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "ram_gb",
|
||||
"label": "内存(GB)",
|
||||
"type": "number",
|
||||
"description": "RAM容量",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "storage_gb",
|
||||
"label": "存储(GB)",
|
||||
"type": "number",
|
||||
"description": "存储容量",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "screen_size",
|
||||
"label": "屏幕尺寸",
|
||||
"type": "text",
|
||||
"description": "屏幕尺寸(英寸)",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "battery_mah",
|
||||
"label": "电池(mAh)",
|
||||
"type": "number",
|
||||
"description": "电池容量",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "price",
|
||||
"label": "价格",
|
||||
"type": "number",
|
||||
"description": "参考价格",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "year",
|
||||
"label": "年份",
|
||||
"type": "number",
|
||||
"description": "发布年份",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "description",
|
||||
"label": "描述",
|
||||
"type": "text",
|
||||
"description": "产品简介",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -280,6 +751,85 @@
|
||||
"price": "价格"
|
||||
}
|
||||
}
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"key": "name",
|
||||
"label": "名称",
|
||||
"type": "text",
|
||||
"description": "电脑型号",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"key": "brand",
|
||||
"label": "品牌",
|
||||
"type": "text",
|
||||
"description": "品牌",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"key": "processor",
|
||||
"label": "处理器",
|
||||
"type": "text",
|
||||
"description": "CPU型号",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "gpu",
|
||||
"label": "显卡",
|
||||
"type": "text",
|
||||
"description": "GPU型号",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "ram_gb",
|
||||
"label": "内存(GB)",
|
||||
"type": "number",
|
||||
"description": "RAM容量",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "storage_gb",
|
||||
"label": "存储(GB)",
|
||||
"type": "number",
|
||||
"description": "存储容量",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "screen_size",
|
||||
"label": "屏幕尺寸",
|
||||
"type": "text",
|
||||
"description": "屏幕尺寸",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "weight_kg",
|
||||
"label": "重量(kg)",
|
||||
"type": "number",
|
||||
"description": "重量",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "price",
|
||||
"label": "价格",
|
||||
"type": "number",
|
||||
"description": "参考价格",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "year",
|
||||
"label": "年份",
|
||||
"type": "number",
|
||||
"description": "发布年份",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "description",
|
||||
"label": "描述",
|
||||
"type": "text",
|
||||
"description": "产品简介",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -321,6 +871,50 @@
|
||||
"price": "价格"
|
||||
}
|
||||
}
|
||||
],
|
||||
"fields": [
|
||||
{
|
||||
"key": "name",
|
||||
"label": "名称",
|
||||
"type": "text",
|
||||
"description": "车型名称",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"key": "brand",
|
||||
"label": "品牌",
|
||||
"type": "text",
|
||||
"description": "汽车品牌",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"key": "price",
|
||||
"label": "价格(万)",
|
||||
"type": "number",
|
||||
"description": "参考价格(万元)",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "year",
|
||||
"label": "年份",
|
||||
"type": "number",
|
||||
"description": "生产年份",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "specs",
|
||||
"label": "参数",
|
||||
"type": "json",
|
||||
"description": "详细规格参数",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "description",
|
||||
"label": "描述",
|
||||
"type": "text",
|
||||
"description": "车型简介",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -375,6 +969,71 @@
|
||||
"feature_labels": {}
|
||||
}
|
||||
],
|
||||
"updated_at": "2026-04-28 10:55:02"
|
||||
"updated_at": "2026-04-28 10:55:02",
|
||||
"fields": [
|
||||
{
|
||||
"key": "name",
|
||||
"label": "名称",
|
||||
"type": "text",
|
||||
"description": "产品名称",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"key": "brand",
|
||||
"label": "品牌",
|
||||
"type": "text",
|
||||
"description": "品牌",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"key": "sensor",
|
||||
"label": "传感器",
|
||||
"type": "text",
|
||||
"description": "传感器类型/尺寸",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "megapixels",
|
||||
"label": "像素",
|
||||
"type": "number",
|
||||
"description": "有效像素(MP)",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "video_resolution",
|
||||
"label": "视频分辨率",
|
||||
"type": "text",
|
||||
"description": "最高视频分辨率",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "lens_mount",
|
||||
"label": "镜头卡口",
|
||||
"type": "text",
|
||||
"description": "镜头卡口类型",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "price",
|
||||
"label": "价格",
|
||||
"type": "number",
|
||||
"description": "参考价格",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "specs",
|
||||
"label": "参数",
|
||||
"type": "json",
|
||||
"description": "详细规格参数",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"key": "description",
|
||||
"label": "描述",
|
||||
"type": "text",
|
||||
"description": "产品简介",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -2,12 +2,15 @@
|
||||
{
|
||||
"name": "比亚迪宋plus dmi 2021款",
|
||||
"brand": "比亚迪",
|
||||
"price": "18.87",
|
||||
"price": 18.87,
|
||||
"year": "2021",
|
||||
"category_id": "021dc76d36be",
|
||||
"id": "3d20dbcd4bdd",
|
||||
"created_at": "2026-04-09 10:09:56",
|
||||
"subcategory_id": "sedan"
|
||||
"subcategory_id": "suv",
|
||||
"views": 0,
|
||||
"images": [],
|
||||
"updated_at": "2026-04-28 12:32:13"
|
||||
},
|
||||
{
|
||||
"name": "秦PLUS",
|
||||
|
||||
@@ -3,72 +3,97 @@
|
||||
"name": "Osmo Pocket 4",
|
||||
"brand": "DJI",
|
||||
"price": 2999,
|
||||
"specs": {
|
||||
"传感器类型": "1英寸CMOS",
|
||||
"镜头": "20mm, f/2.0",
|
||||
"ISO范围": "50-12800",
|
||||
"视频分辨率": "4K 60fps",
|
||||
"照片最大分辨率": "5472×3648",
|
||||
"电池容量": "1545mAh",
|
||||
"工作温度": "0°C至40°C"
|
||||
},
|
||||
"specs": "[object Object]",
|
||||
"id": "597e29af5937",
|
||||
"category_id": "71fa2b4d818f",
|
||||
"created_at": "2026-04-28 00:07:01",
|
||||
"visible": true,
|
||||
"raw_text": "",
|
||||
"images": [
|
||||
"/static/uploads/1ad784e0b3c6_1777305525.png"
|
||||
],
|
||||
"images": [],
|
||||
"publish_date": "",
|
||||
"views": 0,
|
||||
"is_pinned": false
|
||||
"is_pinned": false,
|
||||
"subcategory_id": "90ce312b560d",
|
||||
"updated_at": "2026-04-28 12:32:38"
|
||||
},
|
||||
{
|
||||
"name": "Osmo Pocket 3",
|
||||
"brand": "DJI",
|
||||
"price": 2799,
|
||||
"specs": {
|
||||
"传感器类型": "1英寸CMOS",
|
||||
"镜头": "20mm, f/2.0",
|
||||
"ISO范围": "50-6400",
|
||||
"视频分辨率": "4K 60fps",
|
||||
"照片最大分辨率": "5472×3648",
|
||||
"电池容量": "1300mAh",
|
||||
"工作温度": "0°C至40°C"
|
||||
},
|
||||
"specs": "[object Object]",
|
||||
"id": "ad10ac80827b",
|
||||
"category_id": "71fa2b4d818f",
|
||||
"created_at": "2026-04-28 00:07:01",
|
||||
"visible": true,
|
||||
"raw_text": "",
|
||||
"images": [
|
||||
"/static/uploads/1ad784e0b3c6_1777305525.png"
|
||||
],
|
||||
"images": [],
|
||||
"publish_date": "",
|
||||
"views": 0,
|
||||
"is_pinned": false
|
||||
"is_pinned": false,
|
||||
"subcategory_id": "90ce312b560d",
|
||||
"updated_at": "2026-04-28 12:32:43"
|
||||
},
|
||||
{
|
||||
"name": "DJI Pocket 2",
|
||||
"brand": "DJI",
|
||||
"price": 1999,
|
||||
"specs": {
|
||||
"传感器类型": "1/1.7英寸CMOS",
|
||||
"镜头": "20mm, f/1.8",
|
||||
"ISO范围": "100-3200",
|
||||
"视频分辨率": "4K 60fps",
|
||||
"照片最大分辨率": "6272×4680",
|
||||
"电池容量": "875mAh",
|
||||
"工作温度": "0°C至40°C"
|
||||
},
|
||||
"specs": "[object Object]",
|
||||
"id": "0fde0f10ad96",
|
||||
"category_id": "71fa2b4d818f",
|
||||
"created_at": "2026-04-28 00:07:01",
|
||||
"visible": true,
|
||||
"raw_text": "",
|
||||
"images": [],
|
||||
"publish_date": "",
|
||||
"views": 0,
|
||||
"is_pinned": false,
|
||||
"subcategory_id": "90ce312b560d",
|
||||
"updated_at": "2026-04-28 12:32:50"
|
||||
},
|
||||
{
|
||||
"name": "EOS R7",
|
||||
"brand": "佳能 (Canon)",
|
||||
"year": 2022,
|
||||
"specs": {
|
||||
"品牌": "佳能 (Canon)",
|
||||
"商品编号": "10090975539899",
|
||||
"店铺": "佳能 (Canon) 数码旗舰店",
|
||||
"外接电源": "支持外接电源",
|
||||
"电池类型": "锂离子电池",
|
||||
"接口": "Wi-Fi 蓝牙 HDMI",
|
||||
"高清摄像": "4K超高清视频",
|
||||
"焦点数量": "5915个",
|
||||
"型号": "EOS R7",
|
||||
"有效像素": "3250万",
|
||||
"传感器类型": "CMOS",
|
||||
"上市时间": "2022-06",
|
||||
"取景器类型": "电子取景器",
|
||||
"液晶屏像素": "162万",
|
||||
"液晶屏尺寸": "3.2英寸",
|
||||
"液晶屏类型": "侧翻屏 旋转屏",
|
||||
"最大光圈": "F3.5",
|
||||
"标准ISO感光度": "ISO 100-32000",
|
||||
"连拍速度": "电子最高约30张/秒,机械最高约15张/秒",
|
||||
"存储介质": "SD卡 SDHC卡 SDXC卡",
|
||||
"功能": "Wi-Fi 4K视频 5轴防抖 高速连拍 翻转自拍",
|
||||
"滤镜直径": "55mm",
|
||||
"视频拍摄能力": "4K 60P",
|
||||
"传感器尺寸": "APS-C",
|
||||
"视频采样": "4:2:2",
|
||||
"像素": "3000-4000万",
|
||||
"镜头卡口": "佳能RF卡口",
|
||||
"RAW照片输出": "14bit",
|
||||
"适用对象": "入门级",
|
||||
"类型": "机身"
|
||||
},
|
||||
"description": "入门级机身",
|
||||
"id": "c8c3f124b2ce",
|
||||
"category_id": "71fa2b4d818f",
|
||||
"created_at": "2026-04-28 16:38:03",
|
||||
"visible": true,
|
||||
"raw_text": "",
|
||||
"images": [
|
||||
"/static/uploads/1ad784e0b3c6_1777305525.png"
|
||||
"/static/uploads/9703a1d16424_1777365365.png"
|
||||
],
|
||||
"publish_date": "",
|
||||
"views": 0,
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
"license": "Proprietary",
|
||||
"description": "智谱AI大模型,中文能力强",
|
||||
"created_at": "2024-01-01",
|
||||
"visible": false,
|
||||
"visible": true,
|
||||
"subcategory_id": "chat"
|
||||
}
|
||||
]
|
||||
BIN
static/uploads/9703a1d16424_1777365365.png
Normal file
BIN
static/uploads/9703a1d16424_1777365365.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 52 KiB |
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user