coaidev/coai
Fork: 909 Star: 7007 (更新于 2024-11-17 10:25:51)
license: Apache-2.0
Language: TypeScript .
🚀 Next Generation AI One-Stop Internationalization Solution. 🚀 下一代 AI 一站式 B/C 端解决方案,支持 OpenAI,Midjourney,Claude,讯飞星火,Stable Diffusion,DALL·E,ChatGLM,通义千问,腾讯混元,360 智脑,百川 AI,火山方舟,新必应,Gemini,Moonshot 等模型,支持对话分享,自定义预设,云端同步,模型市场,支持弹性计费和订阅计划模式,支持图片解析,支持联网搜索,支持模型缓存,丰富美观的后台管理与仪表盘数据统计。
最后发布版本: v3.10 ( 2024-03-10 14:09:33)
🥳 Chat Nio
🚀 Next Generation AIGC One-Stop Business Solution
"Chat Nio > Next Web + One API"
English · 简体中文 · Docs · Discord · Deployment Guide
📝 Features
- 🤖️ Rich Model Support: Multi-model service provider support (OpenAI / Anthropic / Gemini / Midjourney and more than ten compatible formats & private LLM support)
- 🤯 Beautiful UI Design: UI compatible with PC / Pad / Mobile, following Shadcn UI & Tremor Charts design standards, rich and beautiful interface design and backend dashboard
- 🎃 Complete Markdown Support: Support for LaTeX formulas / Mermaid mind maps / table rendering / code highlighting / chart drawing / progress bars and other advanced Markdown syntax support
- 👀 Multi-theme Support: Support for multiple theme switching, including Light Mode for light themes and Dark Mode for dark themes. 👉 Custom Color Scheme
- 📚 Internationalization Support: Support for internationalization, multi-language switching 🇨🇳 🇺🇸 🇯🇵 🇷🇺 👉 Welcome to contribute translations Pull Request
- 🎨 Text-to-Image Support: Support for multiple text-to-image models: OpenAI DALL-E✅ & Midjourney (support for U/V/R operations)✅ & Stable Diffusion✅ etc.
- 📡 Powerful Conversation Sync: Zero-cost cross-device conversation sync support for users, support for conversation sharing (link sharing & save as image & share management), no need for WebDav / WebRTC and other dependencies and complex learning costs
- 🎈 Model Market & Preset System: Support for customizable model market in the backend, providing model introductions, tags, and other parameters. Site owners can customize model introductions according to the situation. Also supports a preset system, including custom presets and cloud synchronization functions.
- 📖 Rich File Parsing: Out-of-the-box, supports file parsing for all models (PDF / Docx / Pptx / Excel / image formats parsing), supports more cloud image storage solutions (S3 / R2 / MinIO etc.), supports OCR image recognition 👉 See project Chat Nio Blob Service for details (supports Vercel / Docker one-click deployment)
- 🌏 Full Model Internet Search: Based on the SearXNG open-source engine, supports rich search engines such as Google / Bing / DuckDuckGo / Yahoo / Wikipedia / Arxiv / Qwant, supports safe search mode, content truncation, image proxy, test search availability, and other functions.
- 💕 Progressive Web App (PWA): Supports PWA applications & desktop support (desktop based on Tauri)
- 🤩 Comprehensive Backend Management: Supports beautiful and rich dashboard, announcement & notification management, user management, subscription management, gift code & redemption code management, price setting, subscription setting, custom model market, custom site name & logo, SMTP email settings, and other functions
- 🤑 Multiple Billing Methods: Supports 💴 Subscription and 💴 Elastic Billing two billing methods. Elastic billing supports per-request billing / token billing / no billing / anonymous calls and minimum request points detection and other powerful features
- 🎉 Innovative Model Caching: Supports enabling model caching: i.e., under the same request parameter hash, if it has been requested before, it will directly return the cached result (hitting the cache will not be billed), reducing the number of requests. You can customize whether to cache models, cache time, multiple cache result numbers, and other advanced cache settings
- 🥪 Additional Features (Support Discontinued): 🍎 AI Project Generator Function / 📂 Batch Article Generation Function / 🥪 AI Card Function (Deprecated)
- 😎 Excellent Channel Management: Self-written excellent channel algorithm, supports ⚡ multi-channel management, supports 🥳priority setting for channel call order, supports 🥳weight setting for load balancing probability distribution of channels at the same priority, supports 🥳user grouping, 🥳automatic retry on failure, 🥳model redirection, 🥳built-in upstream hiding, 🥳channel status management and other powerful enterprise-level functions
- ⭐ OpenAI API Distribution & Proxy System: Supports calling various large models in OpenAI API standard format, integrates powerful channel management functions, only needs to deploy one site to achieve simultaneous development of B/C-end business💖
- 👌 Quick Upstream Synchronization: Channel settings, model market, price settings, and other settings can quickly synchronize with upstream sites, modify your site configuration based on this, quickly build your site, save time and effort, one-click synchronization, quick launch
- 👋 SEO Optimization: Supports SEO optimization, supports custom site name, site logo, and other SEO optimization settings to make search engines crawl faster, making your site stand out👋
- 🎫 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😀
- 🥰 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 Business
- ✅ Beautiful commercial-grade UI, elegant frontend interface and backend management
- ✅ Supports TTS & STT, plugin marketplace, RAG knowledge base and other rich features and modules
- ✅ More payment providers, more billing models and advanced order management
- ✅ Supports more authentication methods, including SMS login, OAuth login, etc.
- ✅ Supports model monitoring, channel health detection, fault alarm automatic channel switching
- ✅ Supports multi-tenant API Key distribution system, enterprise-level token permission management and visitor restrictions
- ✅ Supports security auditing, logging, model rate limiting, API Gateway and other advanced features
- ✅ Supports promotion rewards, professional data statistics, user profile analysis and other business analysis capabilities
- ✅ Supports Discord/Telegram/Feishu and other bot integration capabilities (extension modules)
- ...
🔨 Supported Models
- OpenAI & Azure OpenAI (✅ Vision ✅ Function Calling)
- Anthropic Claude (✅ Vision ✅ Function Calling)
- Google Gemini & PaLM2 (✅ Vision)
- Midjourney (✅ Mode Toggling ✅ U/V/R Actions)
- iFlytek SparkDesk (✅ Vision ✅ Function Calling)
- Zhipu AI ChatGLM (✅ Vision)
- Alibaba Tongyi Qwen
- Tencent Hunyuan
- Baichuan AI
- Moonshot AI (👉 OpenAI)
- DeepSeek AI (👉 OpenAI)
- ByteDance Skylark (✅ Function Calling)
- Groq Cloud AI
- OpenRouter (👉 OpenAI)
- 360 GPT
- LocalAI / Ollama (👉 OpenAI)
👻 OpenAI Compatible API Proxy
- Chat Completions (/v1/chat/completions)
- Image Generation (/v1/images)
- Model List (/v1/models)
- Dashboard Billing (/v1/billing)
📦 Deployment
[!TIP] After successful deployment, the admin account is
root
, with the default passwordchatnio123456
✨ Zeabur (One-Click)
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.
- Click
Deploy
to deploy, and enter the domain name you wish to bind, wait for the deployment to complete.- After deployment is complete, please visit your domain name and log in to the backend management using the username
root
and passwordchatnio123456
. 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
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):
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 ofprogramzmh/chatnio:latest
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):
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 themysql.host
configuration item
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
🤯 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. Due to its personal privatization-oriented design, there are some limitations in secondary commercial development, presenting some issues, such as:
- Difficult conversation synchronization, for example, requiring services like WebDav, high user learning costs, and difficulties in real-time cross-device synchronization.
- Insufficient billing, for example, only supporting elastic billing or only subscription-based, unable to meet the needs of different users.
- Inconvenient file parsing, for example, only supporting uploading images to an image hosting service first, then returning to the site to input the URL direct link in the input box, without built-in file parsing functionality.
- No support for conversation URL sharing, for example, only supporting conversation screenshot sharing, unable to support conversation URL sharing (or only supporting tools like ShareGPT, which cannot promote the site).
- Insufficient channel management, for example, the backend only supports OpenAI format channels, making it difficult to be compatible with other format channels. And only one channel can be filled in, unable to support multi-channel management.
- No API call support, for example, only supporting user interface calls, unable to support API proxying and management.
-
Another type is API distribution-oriented sites with powerful distribution systems, such as projects based on One API. Although these projects support powerful API proxying and management, they lack interface design and some C-end features, such as:
- Insufficient user interface, for example, only supporting API calls, without built-in user interface chat. User interface chat requires manually copying the key and going to other sites to use, which has a high learning cost for ordinary users.
- No subscription system, for example, only supporting elastic billing, lacking billing design for C-end users, unable to meet different user needs, and not user-friendly in terms of cost perception for users without a foundation.
- Insufficient C-end features, for example, only supporting API calls, not supporting conversation synchronization, conversation sharing, file parsing, and other functions.
- Insufficient load balancing, the open-source version does not support the weight parameter, unable to achieve balanced load distribution probability for channels at the same priority (New API also solves this pain point, with a more beautiful UI).
Therefore, we hope to combine the advantages of these two types of projects to create a project that has both a powerful API distribution system and a rich user interface design, thus meeting the needs of C-end users while developing B-end business, improving user experience, reducing user learning costs, and increasing user stickiness.
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!
最近版本更新:(数据更新于 2024-11-09 08:39:39)
2024-03-10 14:09:33 v3.10
2024-01-25 17:06:05 v3.9
2024-01-18 23:50:23 v3.8
2024-01-04 14:30:31 v3.7
2023-11-28 12:39:29 v3.6
2023-10-29 21:15:33 v3.5
2023-10-22 09:24:48 v3.4
2023-10-05 21:36:19 v3.3
2023-10-02 07:50:05 v3.2
2023-09-30 11:22:44 v3.1
主题(topics):
ai, api, api-gateway, chat, chatgpt, cross-platform, gemini, golang, openai, proxy, react
coaidev/coai同语言 TypeScript最近更新仓库
2024-11-22 01:36:46 twentyhq/twenty
2024-11-21 20:34:48 CopilotKit/CopilotKit
2024-11-21 16:58:07 labring/FastGPT
2024-11-21 16:14:54 RSSNext/Follow
2024-11-21 16:12:23 x-extends/vxe-table
2024-11-21 14:55:41 continuedev/continue