Administrator 4a8d21a742 fix(billing): 1. 新增统一计费代理 BillingChatServiceProxy位置:ruoyi-modules/ruoyi-chat/src/main/java/org/ruoyi/chat/service/chat/proxy/BillingChatServiceProxy.java 作用:为所有ChatService实现类提供透明的计费代理包装
核心功能:
  AI回复前余额预检查,避免无效消耗
  自动收集AI回复内容
  统一处理AI回复的保存和计费
   适配多种AI服务的数据格式
  2. 重构工厂类
  ChatServiceFactory
  改进:自动为所有ChatService包装计费代理
 新增方法:getOriginalService() 用于获取未包装的原始服务优势:调用方无需关心计费逻辑,完全透明
 3. 增强计费服务 IChatCostService 接口
   新增方法:checkBalanceSufficient() - 余额预检查
   分离关注点:saveMessage() - 仅保存消息
    publishBillingEvent() - 仅发布计费事件
    deductToken() - 仅执行计费扣费
2025-09-04 16:35:55 +08:00
2025-07-08 14:31:01 +08:00
2025-07-07 12:36:53 +08:00
2025-07-07 12:33:06 +08:00
2025-05-11 19:45:57 +08:00
2024-01-16 12:38:04 +08:00
2025-05-24 16:18:18 +08:00
2025-07-10 23:00:04 +08:00
2025-08-27 10:47:34 +08:00

RuoYi AI

Contributors Forks Stargazers Issues MIT License

RuoYi AI Logo

Enterprise-Grade AI Assistant Platform

Production-ready AI platform with deep integration of FastGPT, Coze, DIFY and advanced RAG technology

📖 中文文档 | 📚 Documentation | 🚀 Live Demo | 🐛 Report Bug | 💡 Request Feature

Key Features

🤖 Advanced AI Engine

  • Multi-Model Support: OpenAI GPT-4, Azure, ChatGLM, Qwen, ZhipuAI
  • 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
  • Streaming Chat: Real-time SSE/WebSocket communication
  • AI Copilot: Intelligent code analysis and project scaffolding

🌟 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
  • 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

🧠 Enterprise RAG Solution

  • Local Knowledge Base: Langchain4j + BGE-large-zh-v1.5 embeddings
  • Vector Database Support: Milvus, Weaviate, Qdrant
  • Privacy-First: On-premise deployment with local LLM support
  • Ollama & vLLM Compatible: Flexible model deployment options

🎨 Creative AI Tools

  • AI Art Generation: DALL·E-3, MidJourney, Stable Diffusion integration
  • PPT Creation: Automated slide generation from text input
  • Multi-Modal Processing: Text, image, and document understanding

🚀 Quick Start

Live Demo

Source Code

Component GitHub Gitee GitCode
Backend API ruoyi-ai ruoyi-ai ruoyi-ai
User Frontend ruoyi-web ruoyi-web ruoyi-web
Admin Frontend ruoyi-admin ruoyi-admin ruoyi-admin

Collaborative Projects

Project Description GitHub Repository Gitee Repository
Simplified Frontend ruoyi-element-ai ruoyi-element-ai

🛠️ Tech Stack

Core Framework

  • Backend: Spring Boot 3.4, Spring AI, Langchain4j
  • Database: MySQL 8.0, Redis, Vector Databases (Milvus/Weaviate/Qdrant)
  • Frontend: Vue 3, Vben Admin, Naive UI
  • Authentication: Sa-Token, JWT

System Components

  • File Processing: PDF, Word, Excel parsing, intelligent image analysis
  • Real-time Communication: WebSocket real-time communication, SSE streaming
  • System Monitoring: Comprehensive logging, performance monitoring, health checks

📚 Documentation

For detailed setup, configuration, and development guides, visit our comprehensive documentation:

📖 Official Documentation

🤝 Contributing

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

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Please submit PRs to GitHub - they will be synchronized to other platforms automatically.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

Special thanks to these amazing open source projects:

🌐 Ecosystem Partners

  • PPIO Cloud - Cost-effective GPU containers and model APIs

💬 Community

WeChat
Add Author WeChat
Scan to join learning group
QQ Group
QQ Group
Technical discussion

Star this repo🍴 Fork it📖 中文文档📚 Documentation

Built with ❤️ by the RuoYi AI community

Description
No description provided
Readme MIT 66 MiB
Languages
Java 94.9%
Shell 3.7%
JavaScript 0.8%
CSS 0.3%
HTML 0.2%