Introduction to HugAi-chatgpt
HugAi is an innovative AI knowledge base developed using the Springboot framework integrated with the openAi SDK. This comprehensive solution is equipped to facilitate GPT conversations and AI drawing using tools such as Midjourney, Stable Diffusion, and OpenAI. HugAi boasts complete open-source accessibility for both its front-end and back-end codebases.
Disclaimer: HugAi is licensed under the Apache-2.0 license and is available for free as an open-source educational resource. Contributions and commercial uses are encouraged to credit the original author, acknowledging the effort invested in developing this project.
-
Back-end source code:
-
Front-end source code:
-
Online Experience: Try it here
-
Documentation: Access help documents
-
Personal Blog: Read more here
Note: For project deployment, please review the help documentation.
Features
HugAi introduces several appealing features:
✅ Facilitates ChatGpt conversations, allowing for diverse REST responses with models such as GPT3.5, 4.0, and 3.5-16K.
✅ Offers a dialogue configuration center for managing platforms, model configurations, API configurations, and managing mirror addresses.
✅ Allows configuration of mirror addresses and ApiKey pools.
✅ Supports mainstream AI drawing functions with Midjourney, Stable Diffusion, and DALL-E, including creating images from text, image-to-image processing, enlargements, redrawings, and prompt optimizations.
✅ Encompasses role-playing capabilities for creative content writing, like ad copywriting, storytelling, and prompt optimization.
✅ Provides support for SSE and WebSocket connections, enabling typewriter-style streaming responses, with dynamic backend settings adjustments without requiring a reboot.
✅ Permits cloud-based conversation logging, maintenance, and contextual token calculation.
✅ Supports multi-user logins, including administrator, user, and guest access with dynamic route encryption that doesn't intrude on the codebase.
✅ Facilitates local, server, and Minio cloud file storage with adjustable file upload strategies.
Integrated large models include OpenAi, iFlytek Spark, Wensiten Speech, and Ollama.
Technology Stack
The HugAi project employs several advanced design patterns and technologies, along with features unique to Java8+ like stream programming and functional interfaces. It's a comprehensive full-stack project designed to enhance technical skills significantly through diligent code review.
Back-end
- Language and Frameworks:
- Java 17
- Springboot 2.7+
- Maven 3.5+
- Mybatis-plus
- RabbitMQ
- Database:
- MySQL 8.0
- Redis
- Core Technologies:
- Advanced Java8+ features like streams, functional interfaces, Options, etc.
- WebSocket and SSE message streaming with dynamic switching
- Queue tasks, concurrency models, and delayed messaging
- Distributed lock management using Redisson
- Captcha validation with Anji Captcha
- Minio for cloud file storage
- Spring Security for authentication and multi-user login capabilities
- Okhttp
- Double-ended queues and delayed messaging
- Mapstruct for object mapping
- Third-party SDKs:
- OpenAI SDK
- Minio and Qiniu Cloud
- Stable Diffusion
- Discord and Midjourney integrations
Front-end
- Vue2
- Element-UI
- Mavon-editor
- Pace-js
- Echarts
Future Plans and TODOs
HugAi is a continuously evolving open-source project. The project incomplete list of upcoming developments includes:
Task | Feature | Description |
---|---|---|
✅ | Management Module | Currently includes site configurations and session management; future updates will add user module and homepage statistics. |
❌ | ||
✅ | SD Drawing | Investigating further; currently using the OpenAI drawing SDK, which needs enhancements. |
❌ | ||
✅ | SD Drawing with ChatGpt | Prompts optimized by ChatGpt, customizable user modes for professional or simple usage. |
✅ | MJ Drawing | Integrated Midjourney drawing capabilities. |
✅ | GPT Conversation Enhancement | Improved GPT Q&A dialogue styling with added features like conversation deletion. |
Gallery | Personal and public galleries for sharing selected images and reusing drawing parameters. | |
❌ | ||
Community Functions | GPT and drawing community features where recommended dialogues and AI drawings can be shared, with comment and like capabilities. | |
Additional Models | Implementation of additional large models like Wensiten Speech, iFlytek Spark, and others. |
Please refer to the help documentation prior to deployment. For questions or insights, feel free to join the discussion group.
- HugAi Discussion Group: 747193904