aicreat — AI创意
v1.0.0图形界面de AI to 创建 and manage NocoBase AI employees — chat机器人 助手s with page integration
运行时依赖
安装命令
点击复制技能文档
NocoBase AI 员工管理 您正在指导用户在 NocoBase 中创建和管理 AI 员工(聊天机器人助手)。
关键概念 AI 员工 AI 员工是配置了以下内容的聊天机器人助手:
- username (PK):唯一标识符,例如 am-asset-keeper
- nickname:显示给用户的名称
- about:定义角色、数据范围和行为的系统提示
- skills:工具绑定(查询、计数、表单填充、工作流调用)
- modelSettings:LLM 配置(服务、模型、温度)
页面集成 AI 员工以两种方式出现在页面上:
- 浮动头像(AIEmployeeShortcutListModel + AIEmployeeShortcutModel):页面右上角的圆形头像按钮
- 操作栏按钮(AIEmployeeButtonModel):表单/表格操作栏中的 AI 按钮
工作流 第 1 阶段:创建 AI 员工 nb_create_ai_employee("my-helper", "助手", "通用助手", "nocobase-015-male", "一行描述", "完整的系统提示,包括角色、数据范围、行为规则...", "欢迎消息...", '[{"name":"dataSource-dataSourceQuery","autoCall":true}]')
第 2 阶段:添加页面快捷方式(浮动头像) nb_ai_shortcut("tab_uid", '[ {"username": "my-helper", "tasks": [ {"title": "快速查询", "message": {"user": "帮我查询数据"}, "autoSend": false} ]} ]')
第 3 阶段:添加块按钮 nb_ai_button("table_uid", "my-helper", '[ {"title": "分析数据", "message": {"user": "分析当前数据"}, "autoSend": false} ]')
可用技能(工具绑定) 工具名称 描述 autoCall dataModeling-getCollectionNames 发现表名 true dataModeling-getCollectionMetadata 获取字段定义 true dataSource-dataSourceQuery 查询数据库 true dataSource-dataSourceCounting 计数记录 true frontend-formFiller 自动填充表单 true workflowCaller- 自定义工作流工具 false
头像 ID 常见头像 ID:nocobase-001-male 至 nocobase-060-male,nocobase-001-female 至 nocobase-060-female。
模型设置 默认 LLM 配置:{ "llmService": "gemini", "model": "models/gemini-2.5-flash", "temperature": 0.7, "topP": 1, "timeout": 60000, "maxRetries": 1, "responseFormat": "text" }
常见调整:
- temperature:0.3 — 更确定,适合数据查询
- temperature:0.9 — 更具创造性,适合写作/建议
- timeout:120000 — 更长的超时时间,适合复杂的多步骤查询
- responseFormat: "markdown" — 格式化输出
页面集成 — 完整示例 浮动头像(快捷方式) 将 AI 员工头像放在页面上以便快速访问: nb_ai_shortcut("tab_uid", '[ {"username": "my-helper", "tasks": [ {"title": "快速查询", "message": {"user": "帮我查一下最新数据"}, "autoSend": false}, {"title": "生成报告", "message": {"user": "生成本月汇总报表"}, "autoSend": false} ]} ]')
同一页上的多个员工: nb_ai_shortcut("tab_uid", '[ {"username": "data-analyst", "tasks": [...]}, {"username": "form-helper", "tasks": [...]} ]')
块按钮 将 AI 操作按钮添加到表格的操作栏中: nb_ai_button("table_uid", "my-helper", '[ {"title": "分析选中的", "message": {"user": "分析当前选中的记录"}, "autoSend": false} ]')
最佳实践
- 角色导向:每个 AI 员工覆盖一个业务领域
- 进步式:从基本查询工具开始,稍后添加工作流工具
- 中文优先:在系统提示中使用 {{$nLang}} 语言感知
- 数据范围:在系统提示中显式列出可访问的表格
- 预设任务:将 1-2 个快速启动任务添加到快捷方式和按钮中
- 系统提示结构:角色 → 数据范围(表名)→ 行为规则 → 输出格式
- 技能选择:从 dataSource-dataSourceQuery + dataModeling-getCollectionMetadata 开始,适合数据导向的员工