feat: enhance agent system with hot/quick questions, dynamic chat UI, and new enterprise agents
- Add hotQuestions and quickQuestions fields to agent model - Update admin form with textarea inputs for hot/quick questions - Make chat page display dynamic agent data (name, icon, questions) - Widen center chat area to 60% for better readability - Add enterprise service category and 3 new agents (jiaotou, promotion, group-policy) - Update Prisma schema formatting and seed data
This commit is contained in:
@@ -76,6 +76,15 @@ async function main() {
|
||||
description: "适用于虚拟主播、数字客服、形象代言等场景,提供逼真的数字人交互体验。",
|
||||
},
|
||||
}),
|
||||
prisma.category.upsert({
|
||||
where: { name: "企业服务" },
|
||||
update: {},
|
||||
create: {
|
||||
name: "企业服务",
|
||||
icon: "🏢",
|
||||
description: "适用于企业专属AI助手、行业解决方案等场景,提供定制化智能服务。",
|
||||
},
|
||||
}),
|
||||
])
|
||||
console.log("Created categories:", categories.map(c => c.name).join(", "))
|
||||
|
||||
@@ -91,6 +100,17 @@ async function main() {
|
||||
icon: "🤖",
|
||||
categoryId: categories[0].id,
|
||||
features: "智能问答, 知识库查询, 工单提交",
|
||||
hotQuestions: JSON.stringify([
|
||||
"养老政策有哪些最新变化?",
|
||||
"如何申请养老服务补贴?",
|
||||
"老年人健康管理需要注意什么?",
|
||||
"养老机构如何选择?",
|
||||
]),
|
||||
quickQuestions: JSON.stringify([
|
||||
"养老政策咨询",
|
||||
"养老机构推荐",
|
||||
"养老服务申请",
|
||||
]),
|
||||
usageCount: 1000,
|
||||
status: "active",
|
||||
},
|
||||
@@ -137,6 +157,48 @@ async function main() {
|
||||
status: "active",
|
||||
},
|
||||
}),
|
||||
prisma.agent.upsert({
|
||||
where: { slug: "jiaotou-ai-assistant" },
|
||||
update: {},
|
||||
create: {
|
||||
name: "交投集团AI助手",
|
||||
slug: "jiaotou-ai-assistant",
|
||||
description: "专为交投集团打造的智能助手,提供交通投资政策解读、项目分析、数据分析等专业化服务,助力企业决策。",
|
||||
icon: "🚇",
|
||||
categoryId: categories[6].id,
|
||||
features: "政策解读, 项目分析, 数据分析, 决策支持",
|
||||
usageCount: 120,
|
||||
status: "active",
|
||||
},
|
||||
}),
|
||||
prisma.agent.upsert({
|
||||
where: { slug: "promotion-content-ai" },
|
||||
update: {},
|
||||
create: {
|
||||
name: "宣传文稿AI助手",
|
||||
slug: "promotion-content-ai",
|
||||
description: "智能生成各类宣传文稿,包括新闻稿、活动文案、品牌宣传、海报文案等,快速产出高质量宣传内容。",
|
||||
icon: "📝",
|
||||
categoryId: categories[1].id,
|
||||
features: "新闻稿, 活动文案, 品牌宣传, 海报文案",
|
||||
usageCount: 95,
|
||||
status: "active",
|
||||
},
|
||||
}),
|
||||
prisma.agent.upsert({
|
||||
where: { slug: "group-policy-ai-assistant" },
|
||||
update: {},
|
||||
create: {
|
||||
name: "集团制度AI助手",
|
||||
slug: "group-policy-ai-assistant",
|
||||
description: "专注于集团规章制度解读与咨询,快速查询、解读各类制度文件,助力合规管理与制度落地。",
|
||||
icon: "📋",
|
||||
categoryId: categories[6].id,
|
||||
features: "制度解读, 合规咨询, 文件查询, 制度培训",
|
||||
usageCount: 50,
|
||||
status: "active",
|
||||
},
|
||||
}),
|
||||
])
|
||||
console.log("Created agents:", agents.map(a => a.name).join(", "))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user