feat(market): 采用元宝岗位/职能分类(14类)替代人群场景 + AI验证期自动归类
This commit is contained in:
1 parent
9bcf15099f
commit
fe051bd9f3
3 files changed
+53
-80
No files matched your search
@@ -210,35 +210,21 @@ def verify_agent_connectivity(platform: str, endpoint: str, api_key: str) -> dic
|
||||
# ===== 业务场景分类(面向用户的技能/MCP 分类,与后端模型路由的 capability_registry 解耦) =====
|
||||
# 注意:MarketApp.capability 列在此存放「业务场景 id」(见 MARKET_SCENES),不再是 text/vision 等模型能力。
|
||||
MARKET_SCENES: list = [
|
||||
# 自由职业者
|
||||
{"id": "freelance_content", "label": "内容创作/自媒体", "color": "#F59E0B", "group": "freelance"},
|
||||
{"id": "freelance_client", "label": "客户沟通/提案", "color": "#F97316", "group": "freelance"},
|
||||
{"id": "freelance_finance", "label": "报价合同/记账", "color": "#FBBF24", "group": "freelance"},
|
||||
# 上班从业者
|
||||
{"id": "office_doc", "label": "文档/会议纪要", "color": "#3B82F6", "group": "office"},
|
||||
{"id": "office_data", "label": "数据/报表分析", "color": "#6366F1", "group": "office"},
|
||||
{"id": "office_email", "label": "邮件/协作", "color": "#0EA5E9", "group": "office"},
|
||||
{"id": "office_pm", "label": "项目/周报", "color": "#8B5CF6", "group": "office"},
|
||||
# 育人教育者
|
||||
{"id": "edu_prepare", "label": "备课/课件", "color": "#10B981", "group": "educator"},
|
||||
{"id": "edu_grade", "label": "作业批改/测评", "color": "#14B8A6", "group": "educator"},
|
||||
{"id": "edu_tutor", "label": "学情辅导/答疑", "color": "#22C55E", "group": "educator"},
|
||||
{"id": "edu_home", "label": "家校沟通", "color": "#84CC16", "group": "educator"},
|
||||
# 电商创业
|
||||
{"id": "biz_product", "label": "商品/营销文案", "color": "#EC4899", "group": "commerce"},
|
||||
{"id": "biz_service", "label": "客服/转化", "color": "#F43F5E", "group": "commerce"},
|
||||
{"id": "biz_ops", "label": "运营/投放", "color": "#D946EF", "group": "commerce"},
|
||||
# 通用提效
|
||||
{"id": "general_write", "label": "通用写作", "color": "#64748B", "group": "general"},
|
||||
{"id": "general_research", "label": "资料/调研", "color": "#06B6D4", "group": "general"},
|
||||
{"id": "general_agent", "label": "智能体/自动化", "color": "#A855F7", "group": "general"},
|
||||
]
|
||||
SCENE_GROUPS: list = [
|
||||
{"id": "freelance", "label": "自由职业者"},
|
||||
{"id": "office", "label": "上班从业者"},
|
||||
{"id": "educator", "label": "育人教育者"},
|
||||
{"id": "commerce", "label": "电商创业"},
|
||||
{"id": "general", "label": "通用提效"},
|
||||
# 元宝生成的「岗位 / 职能」分类(面向使用者视角,与后端模型路由能力解耦)
|
||||
{"id": "design", "label": "🎨 做设计", "color": "#EC4899", "desc": "页面、UI、视觉"},
|
||||
{"id": "frontend", "label": "💻 写前端", "color": "#3B82F6", "desc": "Web 页面、React、Next.js"},
|
||||
{"id": "mobile", "label": "📱 做移动端", "color": "#06B6D4", "desc": "React Native、Expo"},
|
||||
{"id": "backend", "label": "🧪 后端/全栈", "color": "#8B5CF6", "desc": "API、数据库、TypeScript"},
|
||||
{"id": "qa", "label": "🧪 测试质量", "color": "#6366F1", "desc": "TDD、Playwright、验证"},
|
||||
{"id": "search", "label": "🔍 搜索信息", "color": "#0EA5E9", "desc": "网页抓取、质疑、SEO"},
|
||||
{"id": "docs", "label": "✍️ 写文档", "color": "#F59E0B", "desc": "Word/PPT/PDF、文案、PRD"},
|
||||
{"id": "marketing", "label": "📢 推广获客", "color": "#F43F5E", "desc": "营销、社媒、邮件、定价"},
|
||||
{"id": "workflow", "label": "🔄 工作流", "color": "#14B8A6", "desc": "计划、调试、分级、原型"},
|
||||
{"id": "secops", "label": "🛡️ 安全运维", "color": "#EF4444", "desc": "安全审计、Azure、K8s"},
|
||||
{"id": "learning", "label": "🎓 学习教学", "color": "#10B981", "desc": "教学、提问、架构改进"},
|
||||
{"id": "video", "label": "🎬 视频多媒体", "color": "#D946EF", "desc": "AI视频、数字人"},
|
||||
{"id": "collab", "label": "🏢 办公协作", "color": "#64748B", "desc": "飞书全家桶"},
|
||||
{"id": "ai", "label": "🛠️ AI能力", "color": "#A855F7", "desc": "创建Skill、代码审查、统计"},
|
||||
]
|
||||
_VALID_SCENE_IDS = {s["id"] for s in MARKET_SCENES}
|
||||
|
||||
@@ -264,10 +250,10 @@ def _classify_scene(name: str, description: Optional[str], content: Optional[str
|
||||
)
|
||||
if not api_url:
|
||||
return None
|
||||
options = "、".join(f"{s['id']}({s['label']})" for s in MARKET_SCENES)
|
||||
options = "、".join(f"{s['id']}({s['label']}:{s.get('desc','')})" for s in MARKET_SCENES)
|
||||
sys_prompt = (
|
||||
"你是 AI 应用市场的『业务场景分类器』。请站在使用者视角,根据应用名称、描述与内容,"
|
||||
"判断它最常被哪一类【人群 / 岗位 / 业务场景】的用户使用,并归类到下列场景之一:"
|
||||
"你是 AI 应用市场的『技能场景分类器』。请站在使用者视角,根据应用名称、描述与内容,"
|
||||
"判断它最贴合下列哪一类【岗位 / 职能 / 业务场景】,并归类到对应 id:"
|
||||
f"{options}。\n只返回一个 JSON 对象:{{\"capability\": \"<id>\"}},不要任何额外解释或 Markdown。"
|
||||
)
|
||||
user_text = f"名称:{name}\n描述:{description or ''}\n内容摘要:{(content or '')[:2000]}"
|
||||
|
||||
Reference in new issue
Block a user