diff --git a/README.md b/README.md index 5d299060..aff508b0 100644 --- a/README.md +++ b/README.md @@ -43,31 +43,137 @@ English · [简体中文](./README_zh-CN.md) · [Official Website](https://chatn 20. 🎫 **Multiple Redemption Code Systems**: Supports multiple redemption code systems, supports gift codes and redemption codes, supports batch generation, gift codes are suitable for promotional distribution, redemption codes are suitable for card sales, for gift codes of one type, a user can only redeem one code, which to some extent reduces the situation of one user redeeming multiple times in promotions😀 21. 🥰 **Business-Friendly License**: Adopts the **Apache-2.0** open-source license, friendly for commercial secondary development & distribution (please also comply with the provisions of the Apache-2.0 license, do not use for illegal purposes) -> ### ✨ Chat Nio Professional Version +> ### ✨ Chat Nio Pro Version > ![Commercial Version Preview](./screenshot/chatnio-pro.png) > - ✅ Midjourney Proxy Plus > - ✅ More Payment Methods & Order Management > - ✅ Security Audit > - ✅ Plugin Marketplace + +## 🔨 Supported Models +1. OpenAI & Azure OpenAI *(✅ Vision ✅ Function Calling)* +2. Anthropic Claude *(✅ Vision ✅ Function Calling)* +3. Google Gemini & PaLM2 *(✅ Vision)* +4. Midjourney *(✅ Mode Toggling ✅ U/V/R Actions)* +5. iFlytek SparkDesk *(✅ Vision ✅ Function Calling)* +6. Zhipu AI ChatGLM *(✅ Vision)* +7. Alibaba Tongyi Qwen +8. Tencent Hunyuan +9. Baichuan AI +10. Moonshot AI (👉 OpenAI) +11. DeepSeek AI (👉 OpenAI) +12. ByteDance Skylark *(✅ Function Calling)* +13. Groq Cloud AI +14. OpenRouter (👉 OpenAI) +15. 360 GPT +16. LocalAI / Ollama (👉 OpenAI) + +## 👻 OpenAI Compatible API Proxy + - [x] Chat Completions _(/v1/chat/completions)_ + - [x] Image Generation _(/v1/images)_ + - [x] Model List _(/v1/models)_ + - [x] Dashboard Billing _(/v1/billing)_ + + +## 📦 Deployment +> [!TIP] +> **After successful deployment, the admin account is `root`, with the default password `chatnio123456`** + +### ✨ Zeabur (One-Click) +[![Deploy on Zeabur](https://zeabur.com/button.svg)](https://zeabur.com/templates/M86XJI) + +> Zeabur provides a certain free quota, you can use non-paid regions for one-click deployment, and also supports plan subscriptions and elastic billing for flexible expansion. +> 1. Click `Deploy` to deploy, and enter the domain name you wish to bind, wait for the deployment to complete. +> 2. After deployment is complete, please visit your domain name and log in to the backend management using the username `root` and password `chatnio123456`. Please follow the prompts to change the password in the chatnio backend in a timely manner. + +### ⚡ Docker Compose Installation (Recommended) +> [!NOTE] +> After successful execution, the host machine mapping address is `http://localhost:8000` + +```shell +git clone --depth=1 --branch=main --single-branch https://github.com/Deeptrain-Community/chatnio.git +cd chatnio +docker-compose up -d # Run the service +# To use the stable version, use docker-compose -f docker-compose.stable.yaml up -d instead +# To use Watchtower for automatic updates, use docker-compose -f docker-compose.watch.yaml up -d instead +``` + +Version update (_If Watchtower automatic updates are enabled, manual updates are not necessary_): +```shell +docker-compose down +docker-compose pull +docker-compose up -d +``` + +> - MySQL database mount directory: ~/**db** +> - Redis database mount directory: ~/**redis** +> - Configuration file mount directory: ~/**config** + +### ⚡ Docker Installation (Lightweight runtime, commonly used for external _MYSQL/RDS_ services) +> [!NOTE] +> After successful execution, the host machine address is `http://localhost:8094`. +> +> To use the stable version, use `programzmh/chatnio:stable` instead of `programzmh/chatnio:latest` + +```shell +docker run -d --name chatnio \ + --network host \ + -v ~/config:/config \ + -v ~/logs:/logs \ + -v ~/storage:/storage \ + -e MYSQL_HOST=localhost \ + -e MYSQL_PORT=3306 \ + -e MYSQL_DB=chatnio \ + -e MYSQL_USER=root \ + -e MYSQL_PASSWORD=chatnio123456 \ + -e REDIS_HOST=localhost \ + -e REDIS_PORT=6379 \ + -e SECRET=secret \ + -e SERVE_STATIC=true \ + programzmh/chatnio:latest +``` + +> - *--network host* means using the host machine's network, allowing the Docker container to use the host's network. You can modify this as needed. +> - SECRET: JWT secret key, generate a random string and modify accordingly +> - SERVE_STATIC: Whether to enable static file serving (normally this doesn't need to be changed, see FAQ below for details) +> - *-v ~/config:/config* mounts the configuration file, *-v ~/logs:/logs* mounts the host machine directory for log files, *-v ~/storage:/storage* mounts the directory for additional feature generated files +> - MySQL and Redis services need to be configured. Please refer to the information above to modify the environment variables accordingly + +Version update (_After enabling Watchtower, manual updates are not necessary. After execution, follow the steps above to run again_): +```shell +docker stop chatnio +docker rm chatnio +docker pull programzmh/chatnio:latest +``` + +### ⚒ Compile and Install +> [!NOTE] +> After successful deployment, the default port is **8094**, and the access address is `http://localhost:8094` +> +> Config settings (~/config/**config.yaml**) can be overridden using environment variables. For example, the `MYSQL_HOST` environment variable can override the `mysql.host` configuration item + +```shell +git clone https://github.com/Deeptrain-Community/chatnio.git +cd chatnio + +cd app +npm install -g pnpm +pnpm install +pnpm build + +cd .. +go build -o chatnio + +# e.g. using nohup (you can also use systemd or other service manager) +nohup ./chatnio > output.log & # using nohup to run in background +``` + ## 📦 Tech Stack - 🥗 Frontend: React + Redux + Radix UI + Tailwind CSS - 🍎 Backend: Golang + Gin + Redis + MySQL - 🍒 Application Technology: PWA + WebSocket -## ✨ Excellent Open Source Projects -> **Frontend-oriented projects here refer to projects that focus on user chat interfaces, backend-oriented projects refer to projects that focus on API proxying and distribution, and one-stop solutions include both user chat interfaces and API proxying and management* -- [Next Chat @yidadaa](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web) (Frontend-oriented project) -- [Lobe Chat @arvinxx](https://github.com/lobehub/lobe-chat) (Frontend-oriented project) -- [Chat Box @bin-huang](https://github.com/Bin-Huang/chatbox) (Frontend-oriented project) -- [OpenAI Forward @kenyony](https://github.com/KenyonY/openai-forward) (Backend-oriented project) -- [One API @justsong](https://github.com/songquanpeng/one-api) (Backend-oriented project) -- [New API @calon](https://github.com/Calcium-Ion/new-api) (Backend-oriented project) -- [FastGPT @labring](https://github.com/labring/FastGPT) (Knowledge Base) -- [Quivr @quivrhq](https://github.com/StanGirard/quivr) (Knowledge Base) -- [Bingo @weaigc](https://github.com/weaigc/bingo) (Model Library) -- [Midjourney Proxy @novicezk](https://github.com/novicezk/midjourney-proxy) (Model Library) - ## 🤯 Why Create This Project & Project Advantages We found that most AIGC commercial sites on the market are frontend-oriented lightweight deployment projects with beautiful UI interface designs, such as the commercial version of [Next Chat](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web). @@ -91,6 +197,7 @@ thus meeting the needs of C-end users while developing B-end business, improving Thus, **Chat Nio** was born. We hope to create a project that has both a powerful API distribution system and a rich user interface design, becoming the next-generation open-source AIGC project's one-stop commercial solution. + ## ❤ Donations If you find this project helpful, you can give it a Star to show your support! diff --git a/README_zh-CN.md b/README_zh-CN.md index 5619a3ff..1ed9badc 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -241,19 +241,6 @@ nohup ./chatnio > output.log & # using nohup to run in background - 🍎 后端: Golang + Gin + Redis + MySQL - 🍒 应用技术: PWA + WebSocket -## ✨ 优秀开源项目 -> **此处偏前端项目指偏向用户聊天界面的项目, 偏后端项目指偏向于 API 中转和分发的项目, 一站式指包含用户聊天界面和 API 中转和管理的项目* -- [Next Chat @yidadaa](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web) (偏前端项目) -- [Lobe Chat @arvinxx](https://github.com/lobehub/lobe-chat) (偏前端项目) -- [Chat Box @bin-huang](https://github.com/Bin-Huang/chatbox) (偏前端项目) -- [OpenAI Forward @kenyony](https://github.com/KenyonY/openai-forward) (偏后端项目) -- [One API @justsong](https://github.com/songquanpeng/one-api) (偏后端项目) -- [New API @calon](https://github.com/Calcium-Ion/new-api) (偏后端项目) -- [FastGPT @labring](https://github.com/labring/FastGPT) (知识库) -- [Quivr @quivrhq](https://github.com/StanGirard/quivr) (知识库) -- [Bingo @weaigc](https://github.com/weaigc/bingo) (模型库) -- [Midjourney Proxy @novicezk](https://github.com/novicezk/midjourney-proxy) (模型库) - ## 🤯 为什么写此项目 & 项目优势 我们发现,市面上的 AIGC 商业站点,大多数都是偏向于前端轻量部署的项目,有精美的 UI 界面设计, 比如 [Next Chat](https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web) 的二开商业版本,