mirror of
https://gitcode.com/ageerle/ruoyi-ai.git
synced 2026-04-04 23:37:32 +00:00
Merge branch 'main' into main
This commit is contained in:
54
README.md
54
README.md
@@ -18,19 +18,20 @@
|
|||||||
|
|
||||||
<img src="image/00.png" alt="RuoYi AI Logo" width="120" height="120">
|
<img src="image/00.png" alt="RuoYi AI Logo" width="120" height="120">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### 企业级AI助手平台
|
### 企业级AI助手平台
|
||||||
|
|
||||||
*开箱即用的智能AI平台,深度集成 FastGPT、扣子(Coze)、DIFY 等主流AI平台,提供先进的RAG技术、知识图谱、数字人和AI流程编排能力*
|
*开箱即用的智能AI平台,深度集成 FastGPT、扣子(Coze)、DIFY 等主流AI平台,提供先进的RAG技术、知识图谱、数字人和AI流程编排能力*
|
||||||
|
|
||||||
**[🇺🇸 English](README_EN.md)** | **[📖 使用文档](https://doc.pandarobot.chat)** | **[🚀 在线体验](https://web.pandarobot.chat)** | **[🐛 问题反馈](https://github.com/ageerle/ruoyi-ai/issues)** | **[💡 功能建议](https://github.com/ageerle/ruoyi-ai/issues)**
|
**[🇺🇸 English](README_EN.md)** | **[📖 使用文档](https://doc.pandarobot.chat)** | *
|
||||||
|
*[🚀 在线体验](https://web.pandarobot.chat)** | **[🐛 问题反馈](https://github.com/ageerle/ruoyi-ai/issues)** | *
|
||||||
|
*[💡 功能建议](https://github.com/ageerle/ruoyi-ai/issues)**
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
## ✨ 核心亮点
|
## ✨ 核心亮点
|
||||||
|
|
||||||
### 智能AI引擎
|
### 智能AI引擎
|
||||||
|
|
||||||
- **多模型接入**:支持 OpenAI GPT-4、Azure、ChatGLM、通义千问、智谱AI 等主流模型
|
- **多模型接入**:支持 OpenAI GPT-4、Azure、ChatGLM、通义千问、智谱AI 等主流模型
|
||||||
- **AI平台集成**:深度集成 **FastGPT**、**扣子(Coze)**、**DIFY** 等主流AI应用平台
|
- **AI平台集成**:深度集成 **FastGPT**、**扣子(Coze)**、**DIFY** 等主流AI应用平台
|
||||||
- **Spring AI MCP 集成**:基于模型上下文协议,打造可扩展的AI工具生态系统
|
- **Spring AI MCP 集成**:基于模型上下文协议,打造可扩展的AI工具生态系统
|
||||||
@@ -38,60 +39,64 @@
|
|||||||
- **AI 编程助手**:内置智能代码分析和项目脚手架生成能力
|
- **AI 编程助手**:内置智能代码分析和项目脚手架生成能力
|
||||||
|
|
||||||
### AI平台生态集成
|
### AI平台生态集成
|
||||||
|
|
||||||
- **FastGPT 深度集成**:原生支持 FastGPT API,包括知识库检索、工作流编排和上下文管理
|
- **FastGPT 深度集成**:原生支持 FastGPT API,包括知识库检索、工作流编排和上下文管理
|
||||||
- **扣子(Coze) 官方SDK**:集成字节跳动扣子平台官方SDK,支持Bot对话和流式响应
|
- **扣子(Coze) 官方SDK**:集成字节跳动扣子平台官方SDK,支持Bot对话和流式响应
|
||||||
- **DIFY 完整兼容**:使用 DIFY Java Client,支持应用编排、工作流和知识库管理
|
- **DIFY 完整兼容**:使用 DIFY Java Client,支持应用编排、工作流和知识库管理
|
||||||
- **统一聊天接口**:提供统一的聊天服务接口,支持多平台无缝切换和负载均衡
|
- **统一聊天接口**:提供统一的聊天服务接口,支持多平台无缝切换和负载均衡
|
||||||
|
|
||||||
### 本地化RAG方案
|
### 本地化RAG方案
|
||||||
|
|
||||||
- **私有知识库**:基于 Langchain4j 框架 + BGE-large-zh-v1.5 中文向量模型
|
- **私有知识库**:基于 Langchain4j 框架 + BGE-large-zh-v1.5 中文向量模型
|
||||||
- **多种向量库**:支持 Milvus、Weaviate、Qdrant 等主流向量数据库
|
- **多种向量库**:支持 Milvus、Weaviate、Qdrant 等主流向量数据库
|
||||||
- **数据安全可控**:支持完全本地部署,保护企业数据隐私
|
- **数据安全可控**:支持完全本地部署,保护企业数据隐私
|
||||||
- **灵活模型部署**:兼容 Ollama、vLLM 等本地推理框架
|
- **灵活模型部署**:兼容 Ollama、vLLM 等本地推理框架
|
||||||
|
|
||||||
### AI创作工具
|
### AI创作工具
|
||||||
|
|
||||||
- **AI 绘画创作**:深度集成 DALL·E-3、MidJourney、Stable Diffusion
|
- **AI 绘画创作**:深度集成 DALL·E-3、MidJourney、Stable Diffusion
|
||||||
- **智能PPT生成**:一键将文本内容转换为精美演示文稿
|
- **智能PPT生成**:一键将文本内容转换为精美演示文稿
|
||||||
- **多模态理解**:支持文本、图片、文档等多种格式的智能处理
|
- **多模态理解**:支持文本、图片、文档等多种格式的智能处理
|
||||||
|
|
||||||
### 知识图谱与智能编排
|
### 知识图谱与智能编排
|
||||||
|
|
||||||
- **知识图谱构建**:自动从文档和对话中提取实体关系,构建可视化知识网络
|
- **知识图谱构建**:自动从文档和对话中提取实体关系,构建可视化知识网络
|
||||||
- **AI 流程编排**:可视化工作流设计器,支持复杂AI任务的编排和自动化执行
|
- **AI 流程编排**:可视化工作流设计器,支持复杂AI任务的编排和自动化执行
|
||||||
- **数字人交互**:集成数字人形象,提供更自然的人机交互体验
|
- **数字人交互**:集成数字人形象,提供更自然的人机交互体验
|
||||||
- **智能推理引擎**:基于知识图谱的智能推理和问答能力
|
- **智能推理引擎**:基于知识图谱的智能推理和问答能力
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 🚀 快速体验
|
## 🚀 快速体验
|
||||||
|
|
||||||
### 在线演示
|
### 在线演示
|
||||||
|
|
||||||
- **用户端体验**:[web.pandarobot.chat](https://web.pandarobot.chat) (账号:admin 密码:admin123)
|
- **用户端体验**:[web.pandarobot.chat](https://web.pandarobot.chat) (账号:admin 密码:admin123)
|
||||||
- **管理后台**:[admin.pandarobot.chat](https://admin.pandarobot.chat) (账号:admin 密码:admin123)
|
- **管理后台**:[admin.pandarobot.chat](https://admin.pandarobot.chat) (账号:admin 密码:admin123)
|
||||||
|
|
||||||
### 项目源码
|
### 项目源码
|
||||||
| 项目模块 | GitHub 仓库 | Gitee 仓库 | GitCode 仓库 |
|
|
||||||
|---------|------------|-----------|-------------|
|
| 项目模块 | GitHub 仓库 | Gitee 仓库 | GitCode 仓库 |
|
||||||
| 🔧 后端服务 | [ruoyi-ai](https://github.com/ageerle/ruoyi-ai) | [ruoyi-ai](https://gitee.com/ageerle/ruoyi-ai) | [ruoyi-ai](https://gitcode.com/ageerle/ruoyi-ai) |
|
|----------|-------------------------------------------------------|------------------------------------------------------|--------------------------------------------------------|
|
||||||
| 🎨 用户前端 | [ruoyi-web](https://github.com/ageerle/ruoyi-web) | [ruoyi-web](https://gitee.com/ageerle/ruoyi-web) | [ruoyi-web](https://gitcode.com/ageerle/ruoyi-web) |
|
| 🔧 后端服务 | [ruoyi-ai](https://github.com/ageerle/ruoyi-ai) | [ruoyi-ai](https://gitee.com/ageerle/ruoyi-ai) | [ruoyi-ai](https://gitcode.com/ageerle/ruoyi-ai) |
|
||||||
|
| 🎨 用户前端 | [ruoyi-web](https://github.com/ageerle/ruoyi-web) | [ruoyi-web](https://gitee.com/ageerle/ruoyi-web) | [ruoyi-web](https://gitcode.com/ageerle/ruoyi-web) |
|
||||||
| 🛠️ 管理后台 | [ruoyi-admin](https://github.com/ageerle/ruoyi-admin) | [ruoyi-admin](https://gitee.com/ageerle/ruoyi-admin) | [ruoyi-admin](https://gitcode.com/ageerle/ruoyi-admin) |
|
| 🛠️ 管理后台 | [ruoyi-admin](https://github.com/ageerle/ruoyi-admin) | [ruoyi-admin](https://gitee.com/ageerle/ruoyi-admin) | [ruoyi-admin](https://gitcode.com/ageerle/ruoyi-admin) |
|
||||||
|
|
||||||
### 合作项目
|
### 合作项目
|
||||||
| 项目介绍 | GitHub 仓库 | Gitee 仓库 |
|
|
||||||
|:--------:|:----------:|:----------:|
|
| 项目介绍 | GitHub 仓库 | Gitee 仓库 |
|
||||||
|
|:-----:|:----------------------------------------------------------------------:|:----------------------------------------------------------------:|
|
||||||
| 前端简化版 | [ruoyi-element-ai](https://github.com/element-plus-x/ruoyi-element-ai) | [ruoyi-element-ai](https://gitee.com/he-jiayue/ruoyi-element-ai) |
|
| 前端简化版 | [ruoyi-element-ai](https://github.com/element-plus-x/ruoyi-element-ai) | [ruoyi-element-ai](https://gitee.com/he-jiayue/ruoyi-element-ai) |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 🛠️ 技术架构
|
## 🛠️ 技术架构
|
||||||
|
|
||||||
### 核心框架
|
### 核心框架
|
||||||
|
|
||||||
- **后端架构**:Spring Boot 3.4 + Spring AI + Langchain4j
|
- **后端架构**:Spring Boot 3.4 + Spring AI + Langchain4j
|
||||||
- **数据存储**:MySQL 8.0 + Redis + 向量数据库(Milvus/Weaviate/Qdrant)
|
- **数据存储**:MySQL 8.0 + Redis + 向量数据库(Milvus/Weaviate/Qdrant)
|
||||||
- **前端技术**:Vue 3 + Vben Admin + Naive UI
|
- **前端技术**:Vue 3 + Vben Admin + Naive UI
|
||||||
- **安全认证**:Sa-Token + JWT 双重保障
|
- **安全认证**:Sa-Token + JWT 双重保障
|
||||||
|
|
||||||
### 系统组件
|
### 系统组件
|
||||||
|
|
||||||
- **文档处理**:PDF、Word、Excel 解析,图像智能分析
|
- **文档处理**:PDF、Word、Excel 解析,图像智能分析
|
||||||
- **实时通信**:WebSocket 实时通信,SSE 流式响应
|
- **实时通信**:WebSocket 实时通信,SSE 流式响应
|
||||||
- **系统监控**:完善的日志体系、性能监控、服务健康检查
|
- **系统监控**:完善的日志体系、性能监控、服务健康检查
|
||||||
@@ -107,6 +112,7 @@
|
|||||||
我们热烈欢迎社区贡献!无论您是资深开发者还是初学者,都可以为项目贡献力量 💪
|
我们热烈欢迎社区贡献!无论您是资深开发者还是初学者,都可以为项目贡献力量 💪
|
||||||
|
|
||||||
### 贡献方式
|
### 贡献方式
|
||||||
|
|
||||||
1. **Fork** 项目到您的账户
|
1. **Fork** 项目到您的账户
|
||||||
2. **创建分支** (`git checkout -b feature/新功能名称`)
|
2. **创建分支** (`git checkout -b feature/新功能名称`)
|
||||||
3. **提交代码** (`git commit -m '添加某某功能'`)
|
3. **提交代码** (`git commit -m '添加某某功能'`)
|
||||||
@@ -123,7 +129,8 @@
|
|||||||
|
|
||||||
感谢以下优秀的开源项目为本项目提供支持:
|
感谢以下优秀的开源项目为本项目提供支持:
|
||||||
|
|
||||||
- [Spring AI Alibaba Copilot](https://github.com/springaialibaba/spring-ai-alibaba-copilot) - 基于spring-ai-alibaba 的智能编码助手
|
- [Spring AI Alibaba Copilot](https://github.com/springaialibaba/spring-ai-alibaba-copilot) - 基于spring-ai-alibaba
|
||||||
|
的智能编码助手
|
||||||
- [Spring AI](https://spring.io/projects/spring-ai) - Spring 官方 AI 集成框架
|
- [Spring AI](https://spring.io/projects/spring-ai) - Spring 官方 AI 集成框架
|
||||||
- [Langchain4j](https://github.com/langchain4j/langchain4j) - 强大的 Java LLM 开发框架
|
- [Langchain4j](https://github.com/langchain4j/langchain4j) - 强大的 Java LLM 开发框架
|
||||||
- [RuoYi-Vue-Plus](https://gitee.com/dromara/RuoYi-Vue-Plus) - 成熟的企业级快速开发框架
|
- [RuoYi-Vue-Plus](https://gitee.com/dromara/RuoYi-Vue-Plus) - 成熟的企业级快速开发框架
|
||||||
@@ -132,7 +139,8 @@
|
|||||||
|
|
||||||
## 🌐 生态伙伴
|
## 🌐 生态伙伴
|
||||||
|
|
||||||
- [PPIO 派欧云](https://ppinfra.com/user/register?invited_by=P8QTUY&utm_source=github_ruoyi-ai) - 提供高性价比的 GPU 算力和模型 API 服务
|
- [PPIO 派欧云](https://ppinfra.com/user/register?invited_by=P8QTUY&utm_source=github_ruoyi-ai) - 提供高性价比的 GPU
|
||||||
|
算力和模型 API 服务
|
||||||
- [优云智算](https://www.compshare.cn/?ytag=GPU_YY-gh_ruoyi) - 万卡RTX40系GPU+海内外主流模型API服务,秒级响应,按量计费,新客免费用。
|
- [优云智算](https://www.compshare.cn/?ytag=GPU_YY-gh_ruoyi) - 万卡RTX40系GPU+海内外主流模型API服务,秒级响应,按量计费,新客免费用。
|
||||||
- [胜算云](https://www.shengsuanyun.com/?from=CH_3WG71ZOS) - AI模型算力聚合超市云服务。
|
- [胜算云](https://www.shengsuanyun.com/?from=CH_3WG71ZOS) - AI模型算力聚合超市云服务。
|
||||||
|
|
||||||
@@ -162,20 +170,32 @@
|
|||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
**[⭐ 点个Star支持一下](https://github.com/ageerle/ruoyi-ai)** • **[🍴 Fork 开始贡献](https://github.com/ageerle/ruoyi-ai/fork)** • **[📚 English](README_EN.md)** • **[📖 查看完整文档](https://doc.pandarobot.chat)**
|
**[⭐ 点个Star支持一下](https://github.com/ageerle/ruoyi-ai)** • *
|
||||||
|
*[🍴 Fork 开始贡献](https://github.com/ageerle/ruoyi-ai/fork)** • **[📚 English](README_EN.md)** • *
|
||||||
|
*[📖 查看完整文档](https://doc.pandarobot.chat)**
|
||||||
|
|
||||||
*用 ❤️ 打造,由 RuoYi AI 开源社区维护*
|
*用 ❤️ 打造,由 RuoYi AI 开源社区维护*
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Badge Links -->
|
<!-- Badge Links -->
|
||||||
|
|
||||||
[contributors-shield]: https://img.shields.io/github/contributors/ageerle/ruoyi-ai.svg?style=flat-square
|
[contributors-shield]: https://img.shields.io/github/contributors/ageerle/ruoyi-ai.svg?style=flat-square
|
||||||
|
|
||||||
[contributors-url]: https://github.com/ageerle/ruoyi-ai/graphs/contributors
|
[contributors-url]: https://github.com/ageerle/ruoyi-ai/graphs/contributors
|
||||||
|
|
||||||
[forks-shield]: https://img.shields.io/github/forks/ageerle/ruoyi-ai.svg?style=flat-square
|
[forks-shield]: https://img.shields.io/github/forks/ageerle/ruoyi-ai.svg?style=flat-square
|
||||||
|
|
||||||
[forks-url]: https://github.com/ageerle/ruoyi-ai/network/members
|
[forks-url]: https://github.com/ageerle/ruoyi-ai/network/members
|
||||||
|
|
||||||
[stars-shield]: https://img.shields.io/github/stars/ageerle/ruoyi-ai.svg?style=flat-square
|
[stars-shield]: https://img.shields.io/github/stars/ageerle/ruoyi-ai.svg?style=flat-square
|
||||||
|
|
||||||
[stars-url]: https://github.com/ageerle/ruoyi-ai/stargazers
|
[stars-url]: https://github.com/ageerle/ruoyi-ai/stargazers
|
||||||
|
|
||||||
[issues-shield]: https://img.shields.io/github/issues/ageerle/ruoyi-ai.svg?style=flat-square
|
[issues-shield]: https://img.shields.io/github/issues/ageerle/ruoyi-ai.svg?style=flat-square
|
||||||
|
|
||||||
[issues-url]: https://github.com/ageerle/ruoyi-ai/issues
|
[issues-url]: https://github.com/ageerle/ruoyi-ai/issues
|
||||||
|
|
||||||
[license-shield]: https://img.shields.io/github/license/ageerle/ruoyi-ai.svg?style=flat-square
|
[license-shield]: https://img.shields.io/github/license/ageerle/ruoyi-ai.svg?style=flat-square
|
||||||
|
|
||||||
[license-url]: https://github.com/ageerle/ruoyi-ai/blob/main/LICENSE
|
[license-url]: https://github.com/ageerle/ruoyi-ai/blob/main/LICENSE
|
||||||
|
|||||||
73
README_EN.md
73
README_EN.md
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
# RuoYi AI
|
# RuoYi AI
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
@@ -13,16 +12,19 @@
|
|||||||
|
|
||||||
### Enterprise-Grade AI Assistant Platform
|
### Enterprise-Grade AI Assistant Platform
|
||||||
|
|
||||||
*Production-ready AI platform with deep integration of FastGPT, Coze, DIFY, featuring advanced RAG technology, knowledge graphs, digital humans, and AI workflow orchestration*
|
*Production-ready AI platform with deep integration of FastGPT, Coze, DIFY, featuring advanced RAG technology, knowledge
|
||||||
|
graphs, digital humans, and AI workflow orchestration*
|
||||||
|
|
||||||
**[📖 中文文档](README.md)** | **[📚 Documentation](https://doc.pandarobot.chat)** | **[🚀 Live Demo](https://web.pandarobot.chat)** | **[🐛 Report Bug](https://github.com/ageerle/ruoyi-ai/issues)** | **[💡 Request Feature](https://github.com/ageerle/ruoyi-ai/issues)**
|
**[📖 中文文档](README.md)** | **[📚 Documentation](https://doc.pandarobot.chat)** | *
|
||||||
|
*[🚀 Live Demo](https://web.pandarobot.chat)** | **[🐛 Report Bug](https://github.com/ageerle/ruoyi-ai/issues)** | *
|
||||||
|
*[💡 Request Feature](https://github.com/ageerle/ruoyi-ai/issues)**
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
## ✨ Key Features
|
## ✨ Key Features
|
||||||
|
|
||||||
### 🤖 Advanced AI Engine
|
### 🤖 Advanced AI Engine
|
||||||
|
|
||||||
- **Multi-Model Support**: OpenAI GPT-4, Azure, ChatGLM, Qwen, ZhipuAI
|
- **Multi-Model Support**: OpenAI GPT-4, Azure, ChatGLM, Qwen, ZhipuAI
|
||||||
- **AI Platform Integration**: Deep integration with **FastGPT**, **Coze**, **DIFY** and other leading AI platforms
|
- **AI Platform Integration**: Deep integration with **FastGPT**, **Coze**, **DIFY** and other leading AI platforms
|
||||||
- **Spring AI MCP Integration**: Extensible tool ecosystem with Model Context Protocol
|
- **Spring AI MCP Integration**: Extensible tool ecosystem with Model Context Protocol
|
||||||
@@ -30,58 +32,69 @@
|
|||||||
- **AI Copilot**: Intelligent code analysis and project scaffolding
|
- **AI Copilot**: Intelligent code analysis and project scaffolding
|
||||||
|
|
||||||
### 🌟 AI Platform Ecosystem
|
### 🌟 AI Platform Ecosystem
|
||||||
- **FastGPT Deep Integration**: Native FastGPT API support with knowledge base retrieval, workflow orchestration and context management
|
|
||||||
- **Coze Official SDK**: Integration with ByteDance Coze platform official SDK, supporting Bot conversations and streaming responses
|
- **FastGPT Deep Integration**: Native FastGPT API support with knowledge base retrieval, workflow orchestration and
|
||||||
|
context management
|
||||||
|
- **Coze Official SDK**: Integration with ByteDance Coze platform official SDK, supporting Bot conversations and
|
||||||
|
streaming responses
|
||||||
- **DIFY Full Compatibility**: Using DIFY Java Client for app orchestration, workflows and knowledge base management
|
- **DIFY Full Compatibility**: Using DIFY Java Client for app orchestration, workflows and knowledge base management
|
||||||
- **Unified Chat Interface**: Standardized chat service interface supporting seamless platform switching and load balancing
|
- **Unified Chat Interface**: Standardized chat service interface supporting seamless platform switching and load
|
||||||
|
balancing
|
||||||
|
|
||||||
### 🧠 Enterprise RAG Solution
|
### 🧠 Enterprise RAG Solution
|
||||||
|
|
||||||
- **Local Knowledge Base**: Langchain4j + BGE-large-zh-v1.5 embeddings
|
- **Local Knowledge Base**: Langchain4j + BGE-large-zh-v1.5 embeddings
|
||||||
- **Vector Database Support**: Milvus, Weaviate, Qdrant
|
- **Vector Database Support**: Milvus, Weaviate, Qdrant
|
||||||
- **Privacy-First**: On-premise deployment with local LLM support
|
- **Privacy-First**: On-premise deployment with local LLM support
|
||||||
- **Ollama & vLLM Compatible**: Flexible model deployment options
|
- **Ollama & vLLM Compatible**: Flexible model deployment options
|
||||||
|
|
||||||
### 🎨 Creative AI Tools
|
### 🎨 Creative AI Tools
|
||||||
|
|
||||||
- **AI Art Generation**: DALL·E-3, MidJourney, Stable Diffusion integration
|
- **AI Art Generation**: DALL·E-3, MidJourney, Stable Diffusion integration
|
||||||
- **PPT Creation**: Automated slide generation from text input
|
- **PPT Creation**: Automated slide generation from text input
|
||||||
- **Multi-Modal Processing**: Text, image, and document understanding
|
- **Multi-Modal Processing**: Text, image, and document understanding
|
||||||
|
|
||||||
### 🧩 Knowledge Graph & Intelligent Orchestration
|
### 🧩 Knowledge Graph & Intelligent Orchestration
|
||||||
- **Knowledge Graph Construction**: Automatically extract entities and relationships from documents and conversations to build visual knowledge networks
|
|
||||||
- **AI Workflow Orchestration**: Visual workflow designer supporting complex AI task orchestration and automated execution
|
- **Knowledge Graph Construction**: Automatically extract entities and relationships from documents and conversations to
|
||||||
|
build visual knowledge networks
|
||||||
|
- **AI Workflow Orchestration**: Visual workflow designer supporting complex AI task orchestration and automated
|
||||||
|
execution
|
||||||
- **Digital Human Interaction**: Integrated digital human avatars for more natural human-computer interaction
|
- **Digital Human Interaction**: Integrated digital human avatars for more natural human-computer interaction
|
||||||
- **Intelligent Reasoning Engine**: Knowledge graph-based intelligent reasoning and Q&A capabilities
|
- **Intelligent Reasoning Engine**: Knowledge graph-based intelligent reasoning and Q&A capabilities
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 🚀 Quick Start
|
## 🚀 Quick Start
|
||||||
|
|
||||||
### Live Demo
|
### Live Demo
|
||||||
|
|
||||||
- **User Portal**: [web.pandarobot.chat](https://web.pandarobot.chat) (demo/demo123)
|
- **User Portal**: [web.pandarobot.chat](https://web.pandarobot.chat) (demo/demo123)
|
||||||
- **Admin Panel**: [admin.pandarobot.chat](https://admin.pandarobot.chat) (admin/admin123)
|
- **Admin Panel**: [admin.pandarobot.chat](https://admin.pandarobot.chat) (admin/admin123)
|
||||||
|
|
||||||
### Source Code
|
### Source Code
|
||||||
| Component | GitHub | Gitee | GitCode |
|
|
||||||
|-----------|--------|-------|---------|
|
| Component | GitHub | Gitee | GitCode |
|
||||||
| Backend API | [ruoyi-ai](https://github.com/ageerle/ruoyi-ai) | [ruoyi-ai](https://gitee.com/ageerle/ruoyi-ai) | [ruoyi-ai](https://gitcode.com/ageerle/ruoyi-ai) |
|
|----------------|-------------------------------------------------------|------------------------------------------------------|--------------------------------------------------------|
|
||||||
| User Frontend | [ruoyi-web](https://github.com/ageerle/ruoyi-web) | [ruoyi-web](https://gitee.com/ageerle/ruoyi-web) | [ruoyi-web](https://gitcode.com/ageerle/ruoyi-web) |
|
| Backend API | [ruoyi-ai](https://github.com/ageerle/ruoyi-ai) | [ruoyi-ai](https://gitee.com/ageerle/ruoyi-ai) | [ruoyi-ai](https://gitcode.com/ageerle/ruoyi-ai) |
|
||||||
|
| User Frontend | [ruoyi-web](https://github.com/ageerle/ruoyi-web) | [ruoyi-web](https://gitee.com/ageerle/ruoyi-web) | [ruoyi-web](https://gitcode.com/ageerle/ruoyi-web) |
|
||||||
| Admin Frontend | [ruoyi-admin](https://github.com/ageerle/ruoyi-admin) | [ruoyi-admin](https://gitee.com/ageerle/ruoyi-admin) | [ruoyi-admin](https://gitcode.com/ageerle/ruoyi-admin) |
|
| Admin Frontend | [ruoyi-admin](https://github.com/ageerle/ruoyi-admin) | [ruoyi-admin](https://gitee.com/ageerle/ruoyi-admin) | [ruoyi-admin](https://gitcode.com/ageerle/ruoyi-admin) |
|
||||||
|
|
||||||
### Collaborative Projects
|
### Collaborative Projects
|
||||||
| Project Description | GitHub Repository | Gitee Repository |
|
|
||||||
|:-------------------:|:-----------------:|:----------------:|
|
|
||||||
| Simplified Frontend | [ruoyi-element-ai](https://github.com/element-plus-x/ruoyi-element-ai) | [ruoyi-element-ai](https://gitee.com/he-jiayue/ruoyi-element-ai) |
|
|
||||||
|
|
||||||
|
| Project Description | GitHub Repository | Gitee Repository |
|
||||||
|
|:-------------------:|:----------------------------------------------------------------------:|:----------------------------------------------------------------:|
|
||||||
|
| Simplified Frontend | [ruoyi-element-ai](https://github.com/element-plus-x/ruoyi-element-ai) | [ruoyi-element-ai](https://gitee.com/he-jiayue/ruoyi-element-ai) |
|
||||||
|
|
||||||
## 🛠️ Tech Stack
|
## 🛠️ Tech Stack
|
||||||
|
|
||||||
### Core Framework
|
### Core Framework
|
||||||
|
|
||||||
- **Backend**: Spring Boot 3.4, Spring AI, Langchain4j
|
- **Backend**: Spring Boot 3.4, Spring AI, Langchain4j
|
||||||
- **Database**: MySQL 8.0, Redis, Vector Databases (Milvus/Weaviate/Qdrant)
|
- **Database**: MySQL 8.0, Redis, Vector Databases (Milvus/Weaviate/Qdrant)
|
||||||
- **Frontend**: Vue 3, Vben Admin, Naive UI
|
- **Frontend**: Vue 3, Vben Admin, Naive UI
|
||||||
- **Authentication**: Sa-Token, JWT
|
- **Authentication**: Sa-Token, JWT
|
||||||
|
|
||||||
### System Components
|
### System Components
|
||||||
|
|
||||||
- **File Processing**: PDF, Word, Excel parsing, intelligent image analysis
|
- **File Processing**: PDF, Word, Excel parsing, intelligent image analysis
|
||||||
- **Real-time Communication**: WebSocket real-time communication, SSE streaming
|
- **Real-time Communication**: WebSocket real-time communication, SSE streaming
|
||||||
- **System Monitoring**: Comprehensive logging, performance monitoring, health checks
|
- **System Monitoring**: Comprehensive logging, performance monitoring, health checks
|
||||||
@@ -94,9 +107,11 @@ For detailed setup, configuration, and development guides, visit our comprehensi
|
|||||||
|
|
||||||
## 🤝 Contributing
|
## 🤝 Contributing
|
||||||
|
|
||||||
We welcome contributions from developers of all skill levels! Whether you're fixing bugs, adding features, or improving documentation, your help is appreciated.
|
We welcome contributions from developers of all skill levels! Whether you're fixing bugs, adding features, or improving
|
||||||
|
documentation, your help is appreciated.
|
||||||
|
|
||||||
### How to Contribute
|
### How to Contribute
|
||||||
|
|
||||||
1. Fork the repository
|
1. Fork the repository
|
||||||
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
||||||
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
||||||
@@ -109,12 +124,12 @@ We welcome contributions from developers of all skill levels! Whether you're fix
|
|||||||
|
|
||||||
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
||||||
|
|
||||||
|
|
||||||
## 🙏 Acknowledgments
|
## 🙏 Acknowledgments
|
||||||
|
|
||||||
Special thanks to these amazing open source projects:
|
Special thanks to these amazing open source projects:
|
||||||
|
|
||||||
- [Spring AI Alibaba Copilot](https://github.com/springaialibaba/spring-ai-alibaba-copilot) - Intelligent coding assistant based on spring-ai-alibaba with MCP protocol integration for project analysis and code generation
|
- [Spring AI Alibaba Copilot](https://github.com/springaialibaba/spring-ai-alibaba-copilot) - Intelligent coding
|
||||||
|
assistant based on spring-ai-alibaba with MCP protocol integration for project analysis and code generation
|
||||||
- [Spring AI](https://spring.io/projects/spring-ai) - Spring's AI integration framework
|
- [Spring AI](https://spring.io/projects/spring-ai) - Spring's AI integration framework
|
||||||
- [Langchain4j](https://github.com/langchain4j/langchain4j) - Java LLM framework
|
- [Langchain4j](https://github.com/langchain4j/langchain4j) - Java LLM framework
|
||||||
- [RuoYi-Vue-Plus](https://gitee.com/dromara/RuoYi-Vue-Plus) - Enterprise development framework
|
- [RuoYi-Vue-Plus](https://gitee.com/dromara/RuoYi-Vue-Plus) - Enterprise development framework
|
||||||
@@ -123,7 +138,8 @@ Special thanks to these amazing open source projects:
|
|||||||
|
|
||||||
## 🌐 Ecosystem Partners
|
## 🌐 Ecosystem Partners
|
||||||
|
|
||||||
- [PPIO Cloud](https://ppinfra.com/user/register?invited_by=P8QTUY&utm_source=github_ruoyi-ai) - Cost-effective GPU containers and model APIs
|
- [PPIO Cloud](https://ppinfra.com/user/register?invited_by=P8QTUY&utm_source=github_ruoyi-ai) - Cost-effective GPU
|
||||||
|
containers and model APIs
|
||||||
|
|
||||||
## 💬 Community
|
## 💬 Community
|
||||||
|
|
||||||
@@ -150,22 +166,33 @@ Special thanks to these amazing open source projects:
|
|||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
|
|
||||||
**[⭐ Star this repo](https://github.com/ageerle/ruoyi-ai)** • **[🍴 Fork it](https://github.com/ageerle/ruoyi-ai/fork)** • **[📖 中文文档](README.md)** • **[📚 Documentation](https://doc.pandarobot.chat)**
|
**[⭐ Star this repo](https://github.com/ageerle/ruoyi-ai)** • **[🍴 Fork it](https://github.com/ageerle/ruoyi-ai/fork)
|
||||||
|
** • **[📖 中文文档](README.md)** • **[📚 Documentation](https://doc.pandarobot.chat)**
|
||||||
|
|
||||||
*Built with ❤️ by the RuoYi AI community*
|
*Built with ❤️ by the RuoYi AI community*
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Badge Links -->
|
<!-- Badge Links -->
|
||||||
|
|
||||||
[contributors-shield]: https://img.shields.io/github/contributors/ageerle/ruoyi-ai.svg?style=flat-square
|
[contributors-shield]: https://img.shields.io/github/contributors/ageerle/ruoyi-ai.svg?style=flat-square
|
||||||
|
|
||||||
[contributors-url]: https://github.com/ageerle/ruoyi-ai/graphs/contributors
|
[contributors-url]: https://github.com/ageerle/ruoyi-ai/graphs/contributors
|
||||||
|
|
||||||
[forks-shield]: https://img.shields.io/github/forks/ageerle/ruoyi-ai.svg?style=flat-square
|
[forks-shield]: https://img.shields.io/github/forks/ageerle/ruoyi-ai.svg?style=flat-square
|
||||||
|
|
||||||
[forks-url]: https://github.com/ageerle/ruoyi-ai/network/members
|
[forks-url]: https://github.com/ageerle/ruoyi-ai/network/members
|
||||||
|
|
||||||
[stars-shield]: https://img.shields.io/github/stars/ageerle/ruoyi-ai.svg?style=flat-square
|
[stars-shield]: https://img.shields.io/github/stars/ageerle/ruoyi-ai.svg?style=flat-square
|
||||||
|
|
||||||
[stars-url]: https://github.com/ageerle/ruoyi-ai/stargazers
|
[stars-url]: https://github.com/ageerle/ruoyi-ai/stargazers
|
||||||
|
|
||||||
[issues-shield]: https://img.shields.io/github/issues/ageerle/ruoyi-ai.svg?style=flat-square
|
[issues-shield]: https://img.shields.io/github/issues/ageerle/ruoyi-ai.svg?style=flat-square
|
||||||
|
|
||||||
[issues-url]: https://github.com/ageerle/ruoyi-ai/issues
|
[issues-url]: https://github.com/ageerle/ruoyi-ai/issues
|
||||||
|
|
||||||
[license-shield]: https://img.shields.io/github/license/ageerle/ruoyi-ai.svg?style=flat-square
|
[license-shield]: https://img.shields.io/github/license/ageerle/ruoyi-ai.svg?style=flat-square
|
||||||
|
|
||||||
[license-url]: https://github.com/ageerle/ruoyi-ai/blob/main/LICENSE
|
[license-url]: https://github.com/ageerle/ruoyi-ai/blob/main/LICENSE
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ mkdir logs minio minio-config mysql redis weaviate
|
|||||||
- `Dockerfile`
|
- `Dockerfile`
|
||||||
|
|
||||||
> 📂 这些文件在项目目录 `/script/deploy/deploy` 下。
|
> 📂 这些文件在项目目录 `/script/deploy/deploy` 下。
|
||||||
> 上传后请检查文件路径是否与上方目录结构一致。
|
> 上传后请检查文件路径是否与上方目录结构一致。
|
||||||
|
|
||||||
------
|
------
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ mkdir logs minio minio-config mysql redis weaviate
|
|||||||
2. 选择 **Maven 构建配置**,勾选 `prod` 环境,取消 `dev` 环境
|
2. 选择 **Maven 构建配置**,勾选 `prod` 环境,取消 `dev` 环境
|
||||||
3. 点击 `package` 进行打包
|
3. 点击 `package` 进行打包
|
||||||
4. **注意:** 在构建前请将 `application-prod.yml` 拖入
|
4. **注意:** 在构建前请将 `application-prod.yml` 拖入
|
||||||
`ruoyi-admin/src/main/resources` 目录中
|
`ruoyi-admin/src/main/resources` 目录中
|
||||||
|
|
||||||
构建完成后会在:
|
构建完成后会在:
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ ruoyi-admin/target/ruoyi-admin.jar
|
|||||||
### 五、上传 Jar 包至服务器
|
### 五、上传 Jar 包至服务器
|
||||||
|
|
||||||
将生成的 `ruoyi-admin.jar` 上传到服务器 `/ruoyi-ai/deploy` 目录下。
|
将生成的 `ruoyi-admin.jar` 上传到服务器 `/ruoyi-ai/deploy` 目录下。
|
||||||
确保与 `Dockerfile` 同目录。
|
确保与 `Dockerfile` 同目录。
|
||||||
|
|
||||||
------
|
------
|
||||||
|
|
||||||
@@ -194,13 +194,13 @@ source /docker-entrypoint-initdb.d/ruoyi-ai.sql;
|
|||||||
|
|
||||||
### 九、常用 Docker 命令
|
### 九、常用 Docker 命令
|
||||||
|
|
||||||
| 功能 | 命令 |
|
| 功能 | 命令 |
|
||||||
| ----------------- | --------------------------------- |
|
|-----------|-----------------------------------|
|
||||||
| 查看容器状态 | `docker ps -a` |
|
| 查看容器状态 | `docker ps -a` |
|
||||||
| 查看日志 | `docker logs -f <容器名>` |
|
| 查看日志 | `docker logs -f <容器名>` |
|
||||||
| 停止服务 | `docker compose down` |
|
| 停止服务 | `docker compose down` |
|
||||||
| 重启服务 | `docker compose restart` |
|
| 重启服务 | `docker compose restart` |
|
||||||
| 重新构建镜像 | `docker compose build --no-cache` |
|
| 重新构建镜像 | `docker compose build --no-cache` |
|
||||||
| 清理无用镜像/容器 | `docker system prune -a` |
|
| 清理无用镜像/容器 | `docker system prune -a` |
|
||||||
|
|
||||||
------
|
------
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
|
|
||||||
## 概述
|
## 概述
|
||||||
|
|
||||||
Ruoyi-AI 工作流模块是一个基于 LangGraph4j 的智能工作流引擎,支持可视化工作流设计、AI 模型集成、条件分支、人机交互等高级功能。该模块采用微服务架构,提供完整的 RESTful API 和流式响应支持。
|
Ruoyi-AI 工作流模块是一个基于 LangGraph4j 的智能工作流引擎,支持可视化工作流设计、AI 模型集成、条件分支、人机交互等高级功能。该模块采用微服务架构,提供完整的
|
||||||
|
RESTful API 和流式响应支持。
|
||||||
|
|
||||||
## 模块架构
|
## 模块架构
|
||||||
|
|
||||||
@@ -48,12 +49,14 @@ ruoyi-ai/
|
|||||||
### 1. 工作流管理
|
### 1. 工作流管理
|
||||||
|
|
||||||
#### 1.1 工作流定义
|
#### 1.1 工作流定义
|
||||||
|
|
||||||
- **创建工作流**: 支持自定义标题、描述、公开性设置
|
- **创建工作流**: 支持自定义标题、描述、公开性设置
|
||||||
- **编辑工作流**: 可视化节点编辑、连接线配置
|
- **编辑工作流**: 可视化节点编辑、连接线配置
|
||||||
- **版本控制**: 支持工作流的版本管理和回滚
|
- **版本控制**: 支持工作流的版本管理和回滚
|
||||||
- **权限管理**: 支持公开/私有工作流设置
|
- **权限管理**: 支持公开/私有工作流设置
|
||||||
|
|
||||||
#### 1.2 工作流执行
|
#### 1.2 工作流执行
|
||||||
|
|
||||||
- **流式执行**: 基于 SSE 的实时流式响应
|
- **流式执行**: 基于 SSE 的实时流式响应
|
||||||
- **状态管理**: 完整的执行状态跟踪
|
- **状态管理**: 完整的执行状态跟踪
|
||||||
- **错误处理**: 详细的错误信息和异常处理
|
- **错误处理**: 详细的错误信息和异常处理
|
||||||
@@ -62,26 +65,31 @@ ruoyi-ai/
|
|||||||
### 2. 节点类型
|
### 2. 节点类型
|
||||||
|
|
||||||
#### 2.1 基础节点
|
#### 2.1 基础节点
|
||||||
|
|
||||||
- **Start**: 开始节点,定义工作流入口
|
- **Start**: 开始节点,定义工作流入口
|
||||||
- **End**: 结束节点,定义工作流出口
|
- **End**: 结束节点,定义工作流出口
|
||||||
|
|
||||||
#### 2.2 AI 模型节点
|
#### 2.2 AI 模型节点
|
||||||
|
|
||||||
- **Answer**: 大语言模型问答节点
|
- **Answer**: 大语言模型问答节点
|
||||||
- **Dalle3**: DALL-E 3 图像生成
|
- **Dalle3**: DALL-E 3 图像生成
|
||||||
- **Tongyiwanx**: 通义万相图像生成
|
- **Tongyiwanx**: 通义万相图像生成
|
||||||
- **Classifier**: 内容分类节点
|
- **Classifier**: 内容分类节点
|
||||||
|
|
||||||
#### 2.3 数据处理节点
|
#### 2.3 数据处理节点
|
||||||
|
|
||||||
- **DocumentExtractor**: 文档信息提取
|
- **DocumentExtractor**: 文档信息提取
|
||||||
- **KeywordExtractor**: 关键词提取
|
- **KeywordExtractor**: 关键词提取
|
||||||
- **FaqExtractor**: 常见问题提取
|
- **FaqExtractor**: 常见问题提取
|
||||||
- **KnowledgeRetrieval**: 知识库检索
|
- **KnowledgeRetrieval**: 知识库检索
|
||||||
|
|
||||||
#### 2.4 控制流节点
|
#### 2.4 控制流节点
|
||||||
|
|
||||||
- **Switcher**: 条件分支节点
|
- **Switcher**: 条件分支节点
|
||||||
- **HumanFeedback**: 人机交互节点
|
- **HumanFeedback**: 人机交互节点
|
||||||
|
|
||||||
#### 2.5 外部集成节点
|
#### 2.5 外部集成节点
|
||||||
|
|
||||||
- **Google**: Google 搜索集成
|
- **Google**: Google 搜索集成
|
||||||
- **MailSend**: 邮件发送
|
- **MailSend**: 邮件发送
|
||||||
- **HttpRequest**: HTTP 请求
|
- **HttpRequest**: HTTP 请求
|
||||||
@@ -90,6 +98,7 @@ ruoyi-ai/
|
|||||||
### 3. 数据流管理
|
### 3. 数据流管理
|
||||||
|
|
||||||
#### 3.1 输入输出定义
|
#### 3.1 输入输出定义
|
||||||
|
|
||||||
```java
|
```java
|
||||||
// 节点输入输出数据结构
|
// 节点输入输出数据结构
|
||||||
public class NodeIOData {
|
public class NodeIOData {
|
||||||
@@ -108,6 +117,7 @@ public enum WfIODataTypeEnum {
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### 3.2 参数引用
|
#### 3.2 参数引用
|
||||||
|
|
||||||
- **节点间引用**: 支持上游节点输出作为下游节点输入
|
- **节点间引用**: 支持上游节点输出作为下游节点输入
|
||||||
- **参数映射**: 自动处理参数名称映射
|
- **参数映射**: 自动处理参数名称映射
|
||||||
- **类型转换**: 自动进行数据类型转换
|
- **类型转换**: 自动进行数据类型转换
|
||||||
@@ -117,6 +127,7 @@ public enum WfIODataTypeEnum {
|
|||||||
### 1. 核心表结构
|
### 1. 核心表结构
|
||||||
|
|
||||||
#### 1.1 工作流定义表 (t_workflow)
|
#### 1.1 工作流定义表 (t_workflow)
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
CREATE TABLE t_workflow (
|
CREATE TABLE t_workflow (
|
||||||
id BIGINT AUTO_INCREMENT PRIMARY KEY,
|
id BIGINT AUTO_INCREMENT PRIMARY KEY,
|
||||||
@@ -133,6 +144,7 @@ CREATE TABLE t_workflow (
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### 1.2 工作流节点表 (t_workflow_node)
|
#### 1.2 工作流节点表 (t_workflow_node)
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
CREATE TABLE t_workflow_node (
|
CREATE TABLE t_workflow_node (
|
||||||
id BIGINT AUTO_INCREMENT PRIMARY KEY,
|
id BIGINT AUTO_INCREMENT PRIMARY KEY,
|
||||||
@@ -153,6 +165,7 @@ CREATE TABLE t_workflow_node (
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### 1.3 工作流边表 (t_workflow_edge)
|
#### 1.3 工作流边表 (t_workflow_edge)
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
CREATE TABLE t_workflow_edge (
|
CREATE TABLE t_workflow_edge (
|
||||||
id BIGINT AUTO_INCREMENT PRIMARY KEY,
|
id BIGINT AUTO_INCREMENT PRIMARY KEY,
|
||||||
@@ -168,6 +181,7 @@ CREATE TABLE t_workflow_edge (
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### 1.4 工作流运行时表 (t_workflow_runtime)
|
#### 1.4 工作流运行时表 (t_workflow_runtime)
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
CREATE TABLE t_workflow_runtime (
|
CREATE TABLE t_workflow_runtime (
|
||||||
id BIGINT AUTO_INCREMENT PRIMARY KEY,
|
id BIGINT AUTO_INCREMENT PRIMARY KEY,
|
||||||
@@ -185,6 +199,7 @@ CREATE TABLE t_workflow_runtime (
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### 1.5 工作流组件表 (t_workflow_component)
|
#### 1.5 工作流组件表 (t_workflow_component)
|
||||||
|
|
||||||
```sql
|
```sql
|
||||||
CREATE TABLE t_workflow_component (
|
CREATE TABLE t_workflow_component (
|
||||||
id BIGINT AUTO_INCREMENT PRIMARY KEY,
|
id BIGINT AUTO_INCREMENT PRIMARY KEY,
|
||||||
@@ -205,6 +220,7 @@ CREATE TABLE t_workflow_component (
|
|||||||
### 1. 工作流管理接口
|
### 1. 工作流管理接口
|
||||||
|
|
||||||
#### 1.1 基础操作
|
#### 1.1 基础操作
|
||||||
|
|
||||||
```http
|
```http
|
||||||
# 创建工作流
|
# 创建工作流
|
||||||
POST /workflow/add
|
POST /workflow/add
|
||||||
@@ -232,6 +248,7 @@ POST /workflow/enable/{uuid}?enable=true
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### 1.2 搜索和查询
|
#### 1.2 搜索和查询
|
||||||
|
|
||||||
```http
|
```http
|
||||||
# 搜索我的工作流
|
# 搜索我的工作流
|
||||||
GET /workflow/mine/search?keyword=关键词&isPublic=true¤tPage=1&pageSize=10
|
GET /workflow/mine/search?keyword=关键词&isPublic=true¤tPage=1&pageSize=10
|
||||||
@@ -246,6 +263,7 @@ GET /workflow/public/component/list
|
|||||||
### 2. 工作流执行接口
|
### 2. 工作流执行接口
|
||||||
|
|
||||||
#### 2.1 流式执行
|
#### 2.1 流式执行
|
||||||
|
|
||||||
```http
|
```http
|
||||||
# 流式执行工作流
|
# 流式执行工作流
|
||||||
POST /workflow/run
|
POST /workflow/run
|
||||||
@@ -266,6 +284,7 @@ Accept: text/event-stream
|
|||||||
```
|
```
|
||||||
|
|
||||||
#### 2.2 运行时管理
|
#### 2.2 运行时管理
|
||||||
|
|
||||||
```http
|
```http
|
||||||
# 恢复中断的工作流
|
# 恢复中断的工作流
|
||||||
POST /workflow/runtime/resume/{runtimeUuid}
|
POST /workflow/runtime/resume/{runtimeUuid}
|
||||||
@@ -287,6 +306,7 @@ POST /workflow/runtime/clear?wfUuid=工作流UUID
|
|||||||
### 3. 管理端接口
|
### 3. 管理端接口
|
||||||
|
|
||||||
#### 3.1 工作流管理
|
#### 3.1 工作流管理
|
||||||
|
|
||||||
```http
|
```http
|
||||||
# 搜索所有工作流
|
# 搜索所有工作流
|
||||||
POST /admin/workflow/search
|
POST /admin/workflow/search
|
||||||
@@ -306,6 +326,7 @@ POST /admin/workflow/enable?uuid=工作流UUID&isEnable=true
|
|||||||
### 1. 工作流引擎 (WorkflowEngine)
|
### 1. 工作流引擎 (WorkflowEngine)
|
||||||
|
|
||||||
工作流引擎是整个模块的核心,负责:
|
工作流引擎是整个模块的核心,负责:
|
||||||
|
|
||||||
- 工作流图的构建和编译
|
- 工作流图的构建和编译
|
||||||
- 节点执行调度
|
- 节点执行调度
|
||||||
- 状态管理和持久化
|
- 状态管理和持久化
|
||||||
@@ -399,7 +420,6 @@ public class WorkflowGraphBuilder {
|
|||||||
4. **状态更新**: 实时更新节点和工作流状态
|
4. **状态更新**: 实时更新节点和工作流状态
|
||||||
5. **错误处理**: 捕获并处理执行过程中的错误
|
5. **错误处理**: 捕获并处理执行过程中的错误
|
||||||
|
|
||||||
|
|
||||||
## 扩展开发
|
## 扩展开发
|
||||||
|
|
||||||
### 1. 自定义节点开发
|
### 1. 自定义节点开发
|
||||||
|
|||||||
4
pom.xml
4
pom.xml
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<parent>
|
<parent>
|
||||||
<artifactId>ruoyi-ai</artifactId>
|
<artifactId>ruoyi-ai</artifactId>
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ public class AuthController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 访客登录
|
* 访客登录
|
||||||
|
*
|
||||||
* @param loginBody 登录信息
|
* @param loginBody 登录信息
|
||||||
* @return token信息
|
* @return token信息
|
||||||
*/
|
*/
|
||||||
@@ -119,7 +120,7 @@ public class AuthController {
|
|||||||
*/
|
*/
|
||||||
@PostMapping("/register")
|
@PostMapping("/register")
|
||||||
public R<Void> register(@Validated @RequestBody RegisterBody user, HttpServletRequest request) {
|
public R<Void> register(@Validated @RequestBody RegisterBody user, HttpServletRequest request) {
|
||||||
String domainName = request.getServerName();
|
String domainName = request.getServerName();
|
||||||
user.setDomainName(domainName);
|
user.setDomainName(domainName);
|
||||||
registerService.register(user);
|
registerService.register(user);
|
||||||
return R.ok();
|
return R.ok();
|
||||||
|
|||||||
@@ -22,5 +22,4 @@ public class IndexController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
--- # 数据源配置
|
--- # 数据源配置
|
||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
|
|||||||
@@ -98,32 +98,32 @@
|
|||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
<!-- 整合 skywalking 控制台输出 tid -->
|
<!-- 整合 skywalking 控制台输出 tid -->
|
||||||
<!-- <appender name="console" class="ch.qos.logback.core.ConsoleAppender">-->
|
<!-- <appender name="console" class="ch.qos.logback.core.ConsoleAppender">-->
|
||||||
<!-- <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">-->
|
<!-- <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">-->
|
||||||
<!-- <layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">-->
|
<!-- <layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">-->
|
||||||
<!-- <pattern>[%tid] ${console.log.pattern}</pattern>-->
|
<!-- <pattern>[%tid] ${console.log.pattern}</pattern>-->
|
||||||
<!-- </layout>-->
|
<!-- </layout>-->
|
||||||
<!-- <charset>utf-8</charset>-->
|
<!-- <charset>utf-8</charset>-->
|
||||||
<!-- </encoder>-->
|
<!-- </encoder>-->
|
||||||
<!-- </appender>-->
|
<!-- </appender>-->
|
||||||
|
|
||||||
<!-- 整合 skywalking 推送采集日志 -->
|
<!-- 整合 skywalking 推送采集日志 -->
|
||||||
<!-- <appender name="sky_log" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender">-->
|
<!-- <appender name="sky_log" class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.log.GRPCLogClientAppender">-->
|
||||||
<!-- <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">-->
|
<!-- <encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">-->
|
||||||
<!-- <layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">-->
|
<!-- <layout class="org.apache.skywalking.apm.toolkit.log.logback.v1.x.TraceIdPatternLogbackLayout">-->
|
||||||
<!-- <pattern>[%tid] ${console.log.pattern}</pattern>-->
|
<!-- <pattern>[%tid] ${console.log.pattern}</pattern>-->
|
||||||
<!-- </layout>-->
|
<!-- </layout>-->
|
||||||
<!-- <charset>utf-8</charset>-->
|
<!-- <charset>utf-8</charset>-->
|
||||||
<!-- </encoder>-->
|
<!-- </encoder>-->
|
||||||
<!-- </appender>-->
|
<!-- </appender>-->
|
||||||
|
|
||||||
<!--系统操作日志-->
|
<!--系统操作日志-->
|
||||||
<root level="info">
|
<root level="info">
|
||||||
<appender-ref ref="console" />
|
<appender-ref ref="console"/>
|
||||||
<appender-ref ref="async_info" />
|
<appender-ref ref="async_info"/>
|
||||||
<appender-ref ref="async_error" />
|
<appender-ref ref="async_error"/>
|
||||||
<appender-ref ref="file_console" />
|
<appender-ref ref="file_console"/>
|
||||||
<!-- <appender-ref ref="sky_log"/>-->
|
<!-- <appender-ref ref="sky_log"/>-->
|
||||||
</root>
|
</root>
|
||||||
|
|
||||||
</configuration>
|
</configuration>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<parent>
|
<parent>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.ruoyi</groupId>
|
<groupId>org.ruoyi</groupId>
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import cn.hutool.core.date.DateUnit;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* @date 2023-03-10
|
* @date 2023-03-10
|
||||||
*/
|
*/
|
||||||
@@ -16,16 +15,14 @@ public class LocalCache {
|
|||||||
* 缓存时长
|
* 缓存时长
|
||||||
*/
|
*/
|
||||||
public static final long TIMEOUT = 30 * DateUnit.MINUTE.getMillis();
|
public static final long TIMEOUT = 30 * DateUnit.MINUTE.getMillis();
|
||||||
/**
|
|
||||||
* 清理间隔
|
|
||||||
*/
|
|
||||||
private static final long CLEAN_TIMEOUT = 30 * DateUnit.MINUTE.getMillis();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 缓存对象
|
* 缓存对象
|
||||||
*/
|
*/
|
||||||
public static final TimedCache<String, Object> CACHE = CacheUtil.newTimedCache(TIMEOUT);
|
public static final TimedCache<String, Object> CACHE = CacheUtil.newTimedCache(TIMEOUT);
|
||||||
|
/**
|
||||||
|
* 清理间隔
|
||||||
|
*/
|
||||||
|
private static final long CLEAN_TIMEOUT = 30 * DateUnit.MINUTE.getMillis();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
//启动定时任务
|
//启动定时任务
|
||||||
|
|||||||
@@ -39,10 +39,10 @@ public class WebSocketConfig {
|
|||||||
}
|
}
|
||||||
// 返回一个WebSocketConfigurer对象,用于配置WebSocket
|
// 返回一个WebSocketConfigurer对象,用于配置WebSocket
|
||||||
return registry -> registry
|
return registry -> registry
|
||||||
// 添加WebSocket处理程序和拦截器到指定路径,设置允许的跨域来源
|
// 添加WebSocket处理程序和拦截器到指定路径,设置允许的跨域来源
|
||||||
.addHandler(webSocketHandler, webSocketProperties.getPath())
|
.addHandler(webSocketHandler, webSocketProperties.getPath())
|
||||||
.addInterceptors(handshakeInterceptor)
|
.addInterceptors(handshakeInterceptor)
|
||||||
.setAllowedOrigins(webSocketProperties.getAllowedOrigins());
|
.setAllowedOrigins(webSocketProperties.getAllowedOrigins());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ public class WebSocketProperties {
|
|||||||
private String path;
|
private String path;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 设置访问源地址
|
* 设置访问源地址
|
||||||
*/
|
*/
|
||||||
private String allowedOrigins;
|
private String allowedOrigins;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
package org.ruoyi.common.chat.constant;
|
package org.ruoyi.common.chat.constant;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* @since 2023-03-06
|
* @since 2023-03-06
|
||||||
*/
|
*/
|
||||||
public class OpenAIConst {
|
public class OpenAIConst {
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import lombok.Data;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* @since 2023-03-18
|
* @since 2023-03-18
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import lombok.Data;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* @since 2023-03-18
|
* @since 2023-03-18
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,9 +4,8 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* @since 2023-04-08
|
* @since 2023-04-08
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import lombok.Data;
|
|||||||
* 账户信息
|
* 账户信息
|
||||||
*
|
*
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* @since 2023-04-08
|
* @since 2023-04-08
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
public class Subscription {
|
public class Subscription {
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ import java.io.Serializable;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* @since 1.1.2
|
* @since 1.1.2
|
||||||
* 2023-03-02
|
* 2023-03-02
|
||||||
@@ -34,6 +33,7 @@ public class BaseMessage implements Serializable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The tool calls generated by the model, such as function calls.
|
* The tool calls generated by the model, such as function calls.
|
||||||
|
*
|
||||||
* @since 1.1.2
|
* @since 1.1.2
|
||||||
*/
|
*/
|
||||||
@JsonProperty("tool_calls")
|
@JsonProperty("tool_calls")
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import lombok.Data;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* @since 2023-03-02
|
* @since 2023-03-02
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import java.io.Serializable;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* : chat模型附带图片的参数
|
* : chat模型附带图片的参数
|
||||||
*
|
*
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* @since 1.1.2
|
* @since 1.1.2
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import lombok.*;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author https://www.unfbx.com
|
* @author https://www.unfbx.com
|
||||||
* @since 1.1.2
|
* @since 1.1.2
|
||||||
* 2023-11-10
|
* 2023-11-10
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
public class FastGPTAnswerResponse {
|
public class FastGPTAnswerResponse {
|
||||||
|
|||||||
@@ -24,8 +24,9 @@ import java.io.Serializable;
|
|||||||
* },
|
* },
|
||||||
* }
|
* }
|
||||||
* </pre>
|
* </pre>
|
||||||
|
*
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* @since 2023-06-14
|
* @since 2023-06-14
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@Builder
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import lombok.NoArgsConstructor;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author https://www.unfbx.com
|
* @author https://www.unfbx.com
|
||||||
* 2023-11-10
|
* 2023-11-10
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -10,8 +10,6 @@ import java.io.Serializable;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* @since 2023-03-02
|
* @since 2023-03-02
|
||||||
*/
|
*/
|
||||||
@@ -24,10 +22,6 @@ public class Message extends BaseMessage implements Serializable {
|
|||||||
@JsonProperty("reasoning_content")
|
@JsonProperty("reasoning_content")
|
||||||
private String reasoningContent;
|
private String reasoningContent;
|
||||||
|
|
||||||
public static Builder builder() {
|
|
||||||
return new Builder();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 构造函数
|
* 构造函数
|
||||||
*
|
*
|
||||||
@@ -57,6 +51,10 @@ public class Message extends BaseMessage implements Serializable {
|
|||||||
super.setToolCallId(builder.toolCallId);
|
super.setToolCallId(builder.toolCallId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Builder builder() {
|
||||||
|
return new Builder();
|
||||||
|
}
|
||||||
|
|
||||||
public static final class Builder {
|
public static final class Builder {
|
||||||
private String role;
|
private String role;
|
||||||
private String content;
|
private String content;
|
||||||
|
|||||||
@@ -25,10 +25,6 @@ public class MessagePicture extends BaseMessage implements Serializable {
|
|||||||
private List<Content> content;
|
private List<Content> content;
|
||||||
|
|
||||||
|
|
||||||
public static Builder builder() {
|
|
||||||
return new Builder();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 构造函数
|
* 构造函数
|
||||||
*
|
*
|
||||||
@@ -58,6 +54,10 @@ public class MessagePicture extends BaseMessage implements Serializable {
|
|||||||
super.setToolCallId(builder.toolCallId);
|
super.setToolCallId(builder.toolCallId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Builder builder() {
|
||||||
|
return new Builder();
|
||||||
|
}
|
||||||
|
|
||||||
public static final class Builder {
|
public static final class Builder {
|
||||||
private String role;
|
private String role;
|
||||||
private List<Content> content;
|
private List<Content> content;
|
||||||
|
|||||||
@@ -5,8 +5,9 @@ import lombok.Data;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 方法参数类,扩展参数可以继承Parameters自己实现
|
* 方法参数类,扩展参数可以继承Parameters自己实现
|
||||||
* 参考:
|
* 参考:
|
||||||
* <pre>
|
* <pre>
|
||||||
* {
|
* {
|
||||||
@@ -21,8 +22,9 @@ import java.util.List;
|
|||||||
* "required": ["location"]
|
* "required": ["location"]
|
||||||
* }
|
* }
|
||||||
* </pre>
|
* </pre>
|
||||||
|
*
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* @since 2023-06-14
|
* @since 2023-06-14
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@Builder
|
||||||
|
|||||||
@@ -7,9 +7,8 @@ import lombok.Data;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* 2023-02-15
|
* 2023-02-15
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
|||||||
@@ -6,10 +6,8 @@ import lombok.Data;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* 2023-02-15
|
* 2023-02-15
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
|||||||
@@ -5,11 +5,10 @@ import lombok.Data;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* 2023-02-15
|
* 2023-02-15
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
|||||||
@@ -7,10 +7,8 @@ import lombok.Data;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* 2023-02-15
|
* 2023-02-15
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 问题类
|
* 问题类
|
||||||
*
|
*
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* 2023-02-11
|
* 2023-02-11
|
||||||
@@ -101,7 +101,8 @@ public class Completion implements Serializable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取当前参数的tokens数
|
* 获取当前参数的tokens数
|
||||||
* @return token数量
|
*
|
||||||
|
* @return token数量
|
||||||
*/
|
*/
|
||||||
// public long tokens() {
|
// public long tokens() {
|
||||||
// if (StrUtil.isBlank(this.prompt) || StrUtil.isBlank(this.model)) {
|
// if (StrUtil.isBlank(this.prompt) || StrUtil.isBlank(this.model)) {
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ import org.ruoyi.common.chat.entity.common.Usage;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 答案类
|
* 答案类
|
||||||
*
|
*
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* 2023-02-11
|
* 2023-02-11
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
|||||||
@@ -7,10 +7,8 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* 2023-02-15
|
* 2023-02-15
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Builder
|
@Builder
|
||||||
@@ -35,7 +33,7 @@ public class Edit implements Serializable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 使用什么取样温度,0到2之间。较高的值(如0.8)将使输出更加随机,而较低的值(如0.2)将使输出更加集中和确定。
|
* 使用什么取样温度,0到2之间。较高的值(如0.8)将使输出更加随机,而较低的值(如0.2)将使输出更加集中和确定。
|
||||||
*
|
* <p>
|
||||||
* We generally recommend altering this or but not both.top_p
|
* We generally recommend altering this or but not both.top_p
|
||||||
*/
|
*/
|
||||||
@Builder.Default
|
@Builder.Default
|
||||||
@@ -43,7 +41,7 @@ public class Edit implements Serializable {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 使用温度采样的替代方法称为核心采样,其中模型考虑具有top_p概率质量的令牌的结果。因此,0.1 意味着只考虑包含前 10% 概率质量的代币。
|
* 使用温度采样的替代方法称为核心采样,其中模型考虑具有top_p概率质量的令牌的结果。因此,0.1 意味着只考虑包含前 10% 概率质量的代币。
|
||||||
*
|
* <p>
|
||||||
* 我们通常建议更改此设置,但不要同时更改两者。temperature
|
* 我们通常建议更改此设置,但不要同时更改两者。temperature
|
||||||
*/
|
*/
|
||||||
@JsonProperty("top_p")
|
@JsonProperty("top_p")
|
||||||
@@ -90,6 +88,7 @@ public class Edit implements Serializable {
|
|||||||
public void setInstruction(String instruction) {
|
public void setInstruction(String instruction) {
|
||||||
this.instruction = instruction;
|
this.instruction = instruction;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Getter
|
@Getter
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum Model {
|
public enum Model {
|
||||||
|
|||||||
@@ -9,10 +9,8 @@ import org.ruoyi.common.chat.entity.common.Usage;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* 2023-02-15
|
* 2023-02-15
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
|||||||
@@ -9,10 +9,8 @@ import java.util.List;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* 2023-02-15
|
* 2023-02-15
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|||||||
@@ -8,10 +8,8 @@ import java.io.Serializable;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* 2023-02-15
|
* 2023-02-15
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
|||||||
@@ -6,10 +6,8 @@ import lombok.Data;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* 2023-02-15
|
* 2023-02-15
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
|||||||
@@ -6,10 +6,8 @@ import lombok.Data;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* 2023-02-15
|
* 2023-02-15
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
|||||||
@@ -6,10 +6,8 @@ import lombok.Data;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* 2023-02-15
|
* 2023-02-15
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ public class FineTune implements Serializable {
|
|||||||
private String validationFile;
|
private String validationFile;
|
||||||
/**
|
/**
|
||||||
* 参考
|
* 参考
|
||||||
|
*
|
||||||
* @see Model
|
* @see Model
|
||||||
*/
|
*/
|
||||||
private String model;
|
private String model;
|
||||||
@@ -101,7 +102,7 @@ public class FineTune implements Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setSuffix(String suffix) {
|
public void setSuffix(String suffix) {
|
||||||
if(Objects.nonNull(suffix) && !"".equals(suffix) && suffix.length() > 40){
|
if (Objects.nonNull(suffix) && !"".equals(suffix) && suffix.length() > 40) {
|
||||||
log.error("后缀长度不能大于40");
|
log.error("后缀长度不能大于40");
|
||||||
throw new BaseException(CommonError.PARAM_ERROR.msg());
|
throw new BaseException(CommonError.PARAM_ERROR.msg());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* 2023-02-15
|
* 2023-02-15
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -11,10 +11,8 @@ import java.io.Serializable;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* 2023-02-15
|
* 2023-02-15
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -48,11 +46,11 @@ public class ImageEdit implements Serializable {
|
|||||||
private String user;
|
private String user;
|
||||||
|
|
||||||
public ImageEdit setN(Integer n) {
|
public ImageEdit setN(Integer n) {
|
||||||
if(n < 1){
|
if (n < 1) {
|
||||||
log.warn("n最小值1");
|
log.warn("n最小值1");
|
||||||
n = 1;
|
n = 1;
|
||||||
}
|
}
|
||||||
if(n > 10){
|
if (n > 10) {
|
||||||
log.warn("n最大值10");
|
log.warn("n最大值10");
|
||||||
n = 10;
|
n = 10;
|
||||||
}
|
}
|
||||||
@@ -61,11 +59,11 @@ public class ImageEdit implements Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ImageEdit setPrompt(String prompt) {
|
public ImageEdit setPrompt(String prompt) {
|
||||||
if(Objects.isNull(prompt) || "".equals(prompt)){
|
if (Objects.isNull(prompt) || "".equals(prompt)) {
|
||||||
log.error("参数异常");
|
log.error("参数异常");
|
||||||
throw new BaseException(CommonError.PARAM_ERROR.msg());
|
throw new BaseException(CommonError.PARAM_ERROR.msg());
|
||||||
}
|
}
|
||||||
if(prompt.length() > 1000){
|
if (prompt.length() > 1000) {
|
||||||
log.error("长度超过1000");
|
log.error("长度超过1000");
|
||||||
throw new BaseException(CommonError.PARAM_ERROR.msg());
|
throw new BaseException(CommonError.PARAM_ERROR.msg());
|
||||||
}
|
}
|
||||||
@@ -74,7 +72,7 @@ public class ImageEdit implements Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ImageEdit setSize(SizeEnum size) {
|
public ImageEdit setSize(SizeEnum size) {
|
||||||
if(Objects.isNull(size)){
|
if (Objects.isNull(size)) {
|
||||||
size = SizeEnum.size_512;
|
size = SizeEnum.size_512;
|
||||||
}
|
}
|
||||||
this.size = size.getName();
|
this.size = size.getName();
|
||||||
@@ -82,7 +80,7 @@ public class ImageEdit implements Serializable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ImageEdit setResponseFormat(ResponseFormat responseFormat) {
|
public ImageEdit setResponseFormat(ResponseFormat responseFormat) {
|
||||||
if(Objects.isNull(responseFormat)){
|
if (Objects.isNull(responseFormat)) {
|
||||||
responseFormat = ResponseFormat.URL;
|
responseFormat = ResponseFormat.URL;
|
||||||
}
|
}
|
||||||
this.responseFormat = responseFormat.getName();
|
this.responseFormat = responseFormat.getName();
|
||||||
|
|||||||
@@ -7,10 +7,8 @@ import java.io.Serializable;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* 2023-02-15
|
* 2023-02-15
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
|||||||
@@ -12,10 +12,8 @@ import java.io.Serializable;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* 2023-02-15
|
* 2023-02-15
|
||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|||||||
@@ -7,10 +7,8 @@ import lombok.Data;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
*
|
|
||||||
* @author https:www.unfbx.com
|
* @author https:www.unfbx.com
|
||||||
* 2023-02-15
|
* 2023-02-15
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user