mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-09-20 20:39:55 +00:00
feat(ai): 重构AI聊天模块,新增会话管理和文件上传功能
- 重构前端聊天界面布局,新增侧边栏管理会话 - 实现会话创建、切换和消息历史加载功能 - 新增文件上传和消息附件支持 - 优化WebSocket连接处理,支持token认证 - 后端新增会话和消息模型,重构WebSocket处理逻辑 - 移除旧的知识库和智能体配置相关代码 - 优化UI样式和交互体验
This commit is contained in:
@@ -1816,7 +1816,7 @@
|
||||
"type": 2,
|
||||
"icon": "el-icon-ToiletPaper",
|
||||
"order": 3,
|
||||
"permission": "module_application:ai:chat",
|
||||
"permission": "module_application:ai_session:query",
|
||||
"route_name": "AI",
|
||||
"route_path": "/application/ai",
|
||||
"component_path": "module_application/ai/index",
|
||||
@@ -1831,11 +1831,11 @@
|
||||
"description": "AI智能助手",
|
||||
"children": [
|
||||
{
|
||||
"name": "智能对话",
|
||||
"name": "聊天会话详情",
|
||||
"type": 3,
|
||||
"icon": null,
|
||||
"order": 1,
|
||||
"permission": "module_application:ai:chat",
|
||||
"permission": "module_application:ai_session:detail",
|
||||
"route_name": null,
|
||||
"route_path": null,
|
||||
"component_path": null,
|
||||
@@ -1843,18 +1843,18 @@
|
||||
"keep_alive": true,
|
||||
"hidden": false,
|
||||
"always_show": false,
|
||||
"title": "智能对话",
|
||||
"title": "聊天会话详情",
|
||||
"params": null,
|
||||
"affix": false,
|
||||
"redirect": null,
|
||||
"description": "智能对话"
|
||||
"description": "聊天会话详情"
|
||||
},
|
||||
{
|
||||
"name": "智能体配置详情",
|
||||
"name": "创建聊天会话",
|
||||
"type": 3,
|
||||
"icon": null,
|
||||
"order": 2,
|
||||
"permission": "module_application:agent-config:detail",
|
||||
"permission": "module_application:ai_session:create",
|
||||
"route_name": null,
|
||||
"route_path": null,
|
||||
"component_path": null,
|
||||
@@ -1862,18 +1862,18 @@
|
||||
"keep_alive": true,
|
||||
"hidden": false,
|
||||
"always_show": false,
|
||||
"title": "智能体配置详情",
|
||||
"title": "创建聊天会话",
|
||||
"params": null,
|
||||
"affix": false,
|
||||
"redirect": null,
|
||||
"description": "智能体配置详情"
|
||||
"description": "创建聊天会话"
|
||||
},
|
||||
{
|
||||
"name": "创建智能体配置",
|
||||
"name": "修改聊天会话",
|
||||
"type": 3,
|
||||
"icon": null,
|
||||
"order": 3,
|
||||
"permission": "module_application:agent-config:create",
|
||||
"permission": "module_application:ai_session:update",
|
||||
"route_name": null,
|
||||
"route_path": null,
|
||||
"component_path": null,
|
||||
@@ -1881,18 +1881,18 @@
|
||||
"keep_alive": true,
|
||||
"hidden": false,
|
||||
"always_show": false,
|
||||
"title": "创建智能体配置",
|
||||
"title": "修改聊天会话",
|
||||
"params": null,
|
||||
"affix": false,
|
||||
"redirect": null,
|
||||
"description": "创建智能体配置"
|
||||
"description": "修改聊天会话"
|
||||
},
|
||||
{
|
||||
"name": "修改智能体配置",
|
||||
"name": "删除聊天会话",
|
||||
"type": 3,
|
||||
"icon": null,
|
||||
"order": 4,
|
||||
"permission": "module_application:agent-config:update",
|
||||
"permission": "module_application:ai_session:delete",
|
||||
"route_name": null,
|
||||
"route_path": null,
|
||||
"component_path": null,
|
||||
@@ -1900,18 +1900,18 @@
|
||||
"keep_alive": true,
|
||||
"hidden": false,
|
||||
"always_show": false,
|
||||
"title": "修改智能体配置",
|
||||
"title": "删除聊天会话",
|
||||
"params": null,
|
||||
"affix": false,
|
||||
"redirect": null,
|
||||
"description": "修改智能体配置"
|
||||
"description": "删除聊天会话"
|
||||
},
|
||||
{
|
||||
"name": "删除智能体配置",
|
||||
"name": "查询聊天会话",
|
||||
"type": 3,
|
||||
"icon": null,
|
||||
"order": 5,
|
||||
"permission": "module_application:agent-config:delete",
|
||||
"permission": "module_application:ai_session:query",
|
||||
"route_name": null,
|
||||
"route_path": null,
|
||||
"component_path": null,
|
||||
@@ -1919,18 +1919,18 @@
|
||||
"keep_alive": true,
|
||||
"hidden": false,
|
||||
"always_show": false,
|
||||
"title": "删除智能体配置",
|
||||
"title": "查询聊天会话",
|
||||
"params": null,
|
||||
"affix": false,
|
||||
"redirect": null,
|
||||
"description": "删除智能体配置"
|
||||
"description": "查询聊天会话"
|
||||
},
|
||||
{
|
||||
"name": "查询智能体配置",
|
||||
"name": "聊天消息详情",
|
||||
"type": 3,
|
||||
"icon": null,
|
||||
"order": 6,
|
||||
"permission": "module_application:agent-config:query",
|
||||
"permission": "module_application:ai_message:detail",
|
||||
"route_name": null,
|
||||
"route_path": null,
|
||||
"component_path": null,
|
||||
@@ -1938,18 +1938,37 @@
|
||||
"keep_alive": true,
|
||||
"hidden": false,
|
||||
"always_show": false,
|
||||
"title": "查询智能体配置",
|
||||
"title": "聊天消息详情",
|
||||
"params": null,
|
||||
"affix": false,
|
||||
"redirect": null,
|
||||
"description": "查询智能体配置"
|
||||
"description": "聊天消息详情"
|
||||
},
|
||||
{
|
||||
"name": "知识库管理详情",
|
||||
"name": "创建聊天消息",
|
||||
"type": 3,
|
||||
"icon": null,
|
||||
"order": 7,
|
||||
"permission": "module_application:ai_message:create",
|
||||
"route_name": null,
|
||||
"route_path": null,
|
||||
"component_path": null,
|
||||
"status": "0",
|
||||
"keep_alive": true,
|
||||
"hidden": false,
|
||||
"always_show": false,
|
||||
"title": "创建聊天消息",
|
||||
"params": null,
|
||||
"affix": false,
|
||||
"redirect": null,
|
||||
"description": "创建聊天消息"
|
||||
},
|
||||
{
|
||||
"name": "修改聊天消息",
|
||||
"type": 3,
|
||||
"icon": null,
|
||||
"order": 8,
|
||||
"permission": "module_application:knowledge:detail",
|
||||
"permission": "module_application:ai_message:update",
|
||||
"route_name": null,
|
||||
"route_path": null,
|
||||
"component_path": null,
|
||||
@@ -1957,18 +1976,18 @@
|
||||
"keep_alive": true,
|
||||
"hidden": false,
|
||||
"always_show": false,
|
||||
"title": "知识库管理详情",
|
||||
"title": "修改聊天消息",
|
||||
"params": null,
|
||||
"affix": false,
|
||||
"redirect": null,
|
||||
"description": "知识库管理详情"
|
||||
"description": "修改聊天消息"
|
||||
},
|
||||
{
|
||||
"name": "创建知识库",
|
||||
"name": "删除聊天消息",
|
||||
"type": 3,
|
||||
"icon": null,
|
||||
"order": 9,
|
||||
"permission": "module_application:knowledge:create",
|
||||
"permission": "module_application:ai_message:delete",
|
||||
"route_name": null,
|
||||
"route_path": null,
|
||||
"component_path": null,
|
||||
@@ -1976,18 +1995,18 @@
|
||||
"keep_alive": true,
|
||||
"hidden": false,
|
||||
"always_show": false,
|
||||
"title": "创建知识库",
|
||||
"title": "删除聊天消息",
|
||||
"params": null,
|
||||
"affix": false,
|
||||
"redirect": null,
|
||||
"description": "创建知识库"
|
||||
"description": "删除聊天消息"
|
||||
},
|
||||
{
|
||||
"name": "修改知识库",
|
||||
"name": "查询聊天消息",
|
||||
"type": 3,
|
||||
"icon": null,
|
||||
"order": 10,
|
||||
"permission": "module_application:knowledge:update",
|
||||
"permission": "module_application:ai_message:query",
|
||||
"route_name": null,
|
||||
"route_path": null,
|
||||
"component_path": null,
|
||||
@@ -1995,144 +2014,11 @@
|
||||
"keep_alive": true,
|
||||
"hidden": false,
|
||||
"always_show": false,
|
||||
"title": "修改知识库",
|
||||
"title": "查询聊天消息",
|
||||
"params": null,
|
||||
"affix": false,
|
||||
"redirect": null,
|
||||
"description": "修改知识库"
|
||||
},
|
||||
{
|
||||
"name": "删除知识库",
|
||||
"type": 3,
|
||||
"icon": null,
|
||||
"order": 11,
|
||||
"permission": "module_application:knowledge:delete",
|
||||
"route_name": null,
|
||||
"route_path": null,
|
||||
"component_path": null,
|
||||
"status": "0",
|
||||
"keep_alive": true,
|
||||
"hidden": false,
|
||||
"always_show": false,
|
||||
"title": "删除知识库",
|
||||
"params": null,
|
||||
"affix": false,
|
||||
"redirect": null,
|
||||
"description": "删除知识库"
|
||||
},
|
||||
{
|
||||
"name": "查询知识库",
|
||||
"type": 3,
|
||||
"icon": null,
|
||||
"order": 12,
|
||||
"permission": "module_application:knowledge:query",
|
||||
"route_name": null,
|
||||
"route_path": null,
|
||||
"component_path": null,
|
||||
"status": "0",
|
||||
"keep_alive": true,
|
||||
"hidden": false,
|
||||
"always_show": false,
|
||||
"title": "查询知识库",
|
||||
"params": null,
|
||||
"affix": false,
|
||||
"redirect": null,
|
||||
"description": "查询知识库"
|
||||
},
|
||||
{
|
||||
"name": "知识库文档详情",
|
||||
"type": 3,
|
||||
"icon": null,
|
||||
"order": 14,
|
||||
"permission": "module_application:document:detail",
|
||||
"route_name": null,
|
||||
"route_path": null,
|
||||
"component_path": null,
|
||||
"status": "0",
|
||||
"keep_alive": true,
|
||||
"hidden": false,
|
||||
"always_show": false,
|
||||
"title": "知识库文档详情",
|
||||
"params": null,
|
||||
"affix": false,
|
||||
"redirect": null,
|
||||
"description": "知识库文档详情"
|
||||
},
|
||||
{
|
||||
"name": "创建知识库文档",
|
||||
"type": 3,
|
||||
"icon": null,
|
||||
"order": 15,
|
||||
"permission": "module_application:document:create",
|
||||
"route_name": null,
|
||||
"route_path": null,
|
||||
"component_path": null,
|
||||
"status": "0",
|
||||
"keep_alive": true,
|
||||
"hidden": false,
|
||||
"always_show": false,
|
||||
"title": "创建知识库文档",
|
||||
"params": null,
|
||||
"affix": false,
|
||||
"redirect": null,
|
||||
"description": "创建知识库文档"
|
||||
},
|
||||
{
|
||||
"name": "修改知识库文档",
|
||||
"type": 3,
|
||||
"icon": null,
|
||||
"order": 16,
|
||||
"permission": "module_application:document:update",
|
||||
"route_name": null,
|
||||
"route_path": null,
|
||||
"component_path": null,
|
||||
"status": "0",
|
||||
"keep_alive": true,
|
||||
"hidden": false,
|
||||
"always_show": false,
|
||||
"title": "修改知识库文档",
|
||||
"params": null,
|
||||
"affix": false,
|
||||
"redirect": null,
|
||||
"description": "修改知识库文档"
|
||||
},
|
||||
{
|
||||
"name": "删除知识库文档",
|
||||
"type": 3,
|
||||
"icon": null,
|
||||
"order": 17,
|
||||
"permission": "module_application:document:delete",
|
||||
"route_name": null,
|
||||
"route_path": null,
|
||||
"component_path": null,
|
||||
"status": "0",
|
||||
"keep_alive": true,
|
||||
"hidden": false,
|
||||
"always_show": false,
|
||||
"title": "删除知识库文档",
|
||||
"params": null,
|
||||
"affix": false,
|
||||
"redirect": null,
|
||||
"description": "删除知识库文档"
|
||||
},
|
||||
{
|
||||
"name": "查询知识库文档",
|
||||
"type": 3,
|
||||
"icon": null,
|
||||
"order": 18,
|
||||
"permission": "module_application:document:query",
|
||||
"route_name": null,
|
||||
"route_path": null,
|
||||
"component_path": null,
|
||||
"status": "0",
|
||||
"keep_alive": true,
|
||||
"hidden": false,
|
||||
"always_show": false,
|
||||
"title": "查询知识库文档",
|
||||
"params": null,
|
||||
"affix": false,
|
||||
"redirect": null,
|
||||
"description": "查询知识库文档"
|
||||
"description": "查询聊天消息"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user