- 多模型接入 — 已集成 DeepSeek、豆包(DouBao)等大模型 API,并通过 OrcaRouter 网关(OpenAI 兼容,base_url
https://api.orcarouter.ai/v1)支持更多模型,统一的 Provider 抽象方便后续扩展 - 流式对话 — SSE 流式输出,Markdown / 代码高亮渲染,体验接近 ChatGPT
- 全栈开箱即用 — 前后端分离架构,自带用户体系、JWT 鉴权、对话历史、文件上传(MinIO)
- 现代前端 — Vue 3 Composition API + TypeScript + Vite,组件化清晰
- 可扩展架构 — 多模块 Maven 项目,AgentScope Agent 框架集成,易于二次开发
💡 部分高级特性(知识库 RAG、多模型智能路由、Agent 编排)处于规划/开发阶段,基于 AgentScope Java 框架实现,详见下方路线图。
┌─────────────────────────────────────────────────────────────┐
│ 前端层 (Vue 3) │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ 对话界面 │ │ 历史会话 │ │ 系统设置 │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
└────────────────────────────┬────────────────────────────────┘
│ SSE / REST
┌────────────────────────────▼────────────────────────────────┐
│ 接入层 (Spring Boot 3.5) │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ Spring │ │ JWT 鉴权 │ │ 全局异常处理 │ │
│ │ Security │ │ │ │ │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
└────────────────────────────┬────────────────────────────────┘
│
┌────────────────────────────▼────────────────────────────────┐
│ 业务服务层 │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ ChatService │ │ User/Auth │ │ FileService │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
│ ┌──────────────┐ ┌──────────────┐ │
│ │ DeepSeek │ │ DouBao │ ... (Provider 抽象) │
│ │ Service │ │ Service │ │
│ └──────────────┘ └──────────────┘ │
└────────────────────────────┬────────────────────────────────┘
│
┌────────────────────────────▼────────────────────────────────┐
│ 持久层 │
│ ┌──────────────┐ ┌──────────────┐ ┌──────────────┐ │
│ │ MySQL (JPA) │ │ Redis 缓存 │ │ MinIO 文件 │ │
│ └──────────────┘ └──────────────┘ └──────────────┘ │
└─────────────────────────────────────────────────────────────┘
| 功能 | 状态 | 描述 |
|---|---|---|
| 智能对话 | ✅ | SSE 流式输出、Markdown 渲染、代码高亮 |
| 模型切换 | ✅ | DeepSeek / 豆包,后端 Provider 模式抽象 |
| 用户体系 | ✅ | 注册/登录、JWT、邮件验证 |
| 对话历史 | ✅ | 会话保存、历史检索 |
| 文件上传 | ✅ | MinIO 对象存储 |
| 知识库 RAG | 🚧 规划 | 基于 AgentScope 框架 + 向量库实现 |
| 多模型智能路由 | 🚧 规划 | 基于 AgentScope Agent 编排,按任务类型自动调度模型 |
- JDK 17+
- Node.js 18+
- MySQL 8.0+
- Redis 6.0+
- RabbitMQ 3.0+
- MinIO (用于文件上传,可选)
cd kobeai_backend
# 在 application.yml 中配置:
# - 数据库连接 (spring.datasource)
# - Redis 地址
# - DeepSeek / 豆包 API Key
mvn spring-boot:runcd kobeai_frontend
npm install
npm run dev除了直连 DeepSeek / 豆包,项目也支持通过 OrcaRouter 接入模型 —— 一个 OpenAI 兼容的 LLM API 网关,提供自适应路由、自动故障转移,并按供应商原价计费(零加价)。
在 application.yml 中配置(不配置则不启用):
app:
ai:
orcarouter:
base-url: https://api.orcarouter.ai
api-key:${AI_API_KEY}# 在 OrcaRouter 注册后获取配置后 Agent 的可用模型会新增 orcarouter-auto(对应网关的 orcarouter/auto 自适应路由模型)。完整代码接入见 feature/agentscope-integration 分支。
IntelliFlow-AI/
├── kobeai_backend/ # Spring Boot 3.5 后端
│ ├── src/main/java/
│ │ └── com/kobeai/hub/
│ │ ├── controller/ # REST API 接口
│ │ ├── service/ # 业务逻辑层
│ │ │ ├── impl/ # 实现类(ChatServiceImpl、各 Provider)
│ │ │ └── AI/ # 各模型 Provider 抽象
│ │ ├── model/ # JPA 实体
│ │ ├── repository/ # 数据访问层 (Spring Data JPA)
│ │ ├── config/ # Spring 配置
│ │ └── utils/ # 工具类
│ └── src/main/resources/
│ └── application.yml
└── kobeai_frontend/ # Vue 3 前端
├── src/
│ ├── views/ # 页面
│ ├── components/ # 通用组件
│ ├── stores/ # Pinia
│ ├── api/ # 接口封装
│ └── utils/ # 工具函数
└── vite.config.ts
后端通过 AIPlatformService 接口统一抽象不同大模型 Provider,新增模型只需实现接口:
public interface AIPlatformService {
void initialize();
void close();
SseEmitter sendMessage(String message);
}目前已实现:DeepSeekServiceImpl、DouBaoServiceImpl。
后端使用 SseEmitter + 异步线程池,前端使用 EventSource 接收增量内容,实现打字机效果。
后端
- Spring Boot 3.5.11 · Spring Security · Spring Data JPA
- AgentScope Java 1.0.12 (Agent 框架)
- LangChain4j 1.0.0-beta3 (大模型集成)
- DeepSeek API · 豆包 API
- OrcaRouter · 可选 LLM 网关 Provider(OpenAI 兼容,模型
orcarouter/auto) - MySQL 8.0 · Redis · RabbitMQ · MinIO
前端
- Vue 3.4 · TypeScript · Vite
- Pinia · Element Plus · Marked.js
- SSE 流式输出
- 基础对话(SSE 流式输出 + Markdown 渲染)
- 多模型 Provider 抽象(DeepSeek、豆包)
- 用户体系与 JWT 鉴权
- 对话历史持久化
- 知识库 RAG (基于 AgentScope + 向量库)
- 多模型智能路由 (基于 AgentScope Agent 编排,按任务类型自动调度模型)
- backend 升级至 JDK 17 + Spring Boot 3.x
- 集成 AgentScope 实现智能体编排 🚧 进行中
- 插件系统 / MCP 协议支持
- 多租户能力
curl https://api.orcarouter.ai/v1/chat/completions \
-H "Authorization: Bearer $ORCA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "orcarouter/auto", "messages": [{"role": "user", "content": "你好"}]}'