🚀 Next Generation AI One-Stop Internationalization Solution. 🚀 下一代 AI 一站式 B/C 端解决方案,支持 OpenAI,Midjourney,Claude,讯飞星火,Stable Diffusion,DALL·E,ChatGLM,通义千问,腾讯混元,360 智脑,百川 AI,火山方舟,新必应,Gemini,Moonshot 等模型,支持对话分享,自定义预设,云端同步,模型市场,支持弹性计费和订阅计划模式,支持图片解析,支持联网搜索,支持模型缓存,丰富美观的后台管理与仪表盘数据统计。
Go to file
2023-12-25 09:30:39 +08:00
.github/workflows update app workflow 2023-11-28 12:42:32 +08:00
adapter feat: add static file service 2023-12-25 09:30:39 +08:00
addition feat: add static file service 2023-12-25 09:30:39 +08:00
admin feat: add static file service 2023-12-25 09:30:39 +08:00
app update: all in one user avatar 2023-12-23 23:26:03 +08:00
auth feat: add static file service 2023-12-25 09:30:39 +08:00
channel feat: add static file service 2023-12-25 09:30:39 +08:00
cli feat: charge alpha 2023-12-08 10:15:45 +08:00
connection fix db 2023-12-24 18:16:10 +08:00
globals feat: update charge api 2023-12-20 15:05:48 +08:00
manager feat: add static file service 2023-12-25 09:30:39 +08:00
middleware feat: update deeptrain mode 2023-12-23 20:14:14 +08:00
migration update: all in one feature 2023-12-23 23:02:51 +08:00
screenshot add progressbar feature 2023-11-13 18:27:12 +08:00
utils feat: add static file service 2023-12-25 09:30:39 +08:00
.dockerignore feat: update dockerfile 2023-12-24 09:25:59 +08:00
.gitignore feat: update dockerfile 2023-12-24 09:25:59 +08:00
config.example.yaml feat: auto config file creating and database root user 2023-12-24 17:59:47 +08:00
docker-compose.yaml feat: add static file service 2023-12-25 09:30:39 +08:00
Dockerfile feat: update docker compose 2023-12-24 23:06:23 +08:00
go.mod feat: add static file service 2023-12-25 09:30:39 +08:00
go.sum feat: add static file service 2023-12-25 09:30:39 +08:00
LICENSE Initial commit 2023-07-18 02:09:58 +08:00
main.go feat: add static file service 2023-12-25 09:30:39 +08:00
nginx.conf feat: update docker compose 2023-12-24 23:06:23 +08:00
qodana.yaml update gpt-4-32k adapter 2023-09-23 22:38:26 +08:00
README.md feat: auto config file creating and database root user 2023-12-24 17:59:47 +08:00

chatnio

Chat Nio

🚀 强大精美的 AI聚合 聊天平台

🚀 Powerful and beautiful AI Aggregation chat platform

官网 | 开放文档 | SDKs | QQ 群

code-stats

📝 功能 | Features

  1. AI 联网功能
    • AI online searching service
  2. 多账户均衡负载
    • Multi-account load balancing
  3. 🎉 HTTP2 Stream 实时响应功能
    • 🎉 HTTP2 Stream real-time response function
  4. 🚀 节流和鉴权体系
    • 🚀 Throttling and authentication system
  5. 🌈 丰富的聊天功能 (代码高亮latex支持卡片生成右键菜单)
    • 🌈 Rich chat features (code highlight, latex support, card generation, right-click menu)
  6. 🎨 多端适配
    • 🎨 Multi-device adaptation
  7. 📦 缓存系统
    • 📦 Cache system
  8. 🎈 对话记忆功能
    • 🎈 Conversation memorization
  9. 👋 对话分享
    • 👋 Conversation sharing
  10. 🎁 图片生成功能
    • 🎁 Image generation
  11. 🔔 PWA 应用
    • 🔔 PWA application
  12. 📚 逆向工程模型支持
    • 📚 Reverse engineering model support
  13. 🌏 国际化支持
    • 🌏 Internationalization support
      • 🇨🇳 简体中文
      • 🇺🇸 English
      • 🇷🇺 Русский
  14. 🍎 主题切换
    • 🍎 Theme switching
  15. 🥪 Key 中转服务
    • 🥪 Key relay service
  16. 🔨 多模型支持
    • 🔨 Multi-model support
  17. ⚙ 后台管理系统 (仪表盘,用户管理,公告管理等)
    • ⚙ Admin system (dashboard, user management, announcement management, etc.)
  18. ⚒ 渠道管理 (多账号均衡负载,优先级调配,权重负载,模型映射,渠道状态管理)
    • ⚒ Channel management (multi-account load balancing, priority allocation, weight load, model mapping, channel status management)
  19. 计费系统 (支持匿名计费按次数计费Token 弹性计费等方式)
    • Billing system (support anonymous billing, billing by number of times, Token billing, etc.)
  20. 📂 文件上传功能 (支持 pdf, docx, pptx, xlsx, 音频, 图片等)
    • 📂 File upload function (support pdf, docx, pptx, xlsx, audio, images, etc.)

🔨 模型 | Models

  • OpenAI ChatGPT (GPT-3.5, GPT-4, Instruct, DALL-E 2, DALL-E 3, Text-Davincci, ...)
  • Azure OpenAI
  • Anthropic Claude (claude-2, claude-instant)
  • Slack Claude (deprecated)
  • Sparkdesk (v1.5, v2, v3)
  • Google PaLM2
  • New Bing (creative, balanced, precise)
  • ChatGLM (turbo, pro, std, lite)
  • DashScope Tongyi (plus, turbo)
  • Midjourney (relax, fast, turbo)
  • Stable Diffusion XL
  • Tencent Hunyuan
  • Baichuan AI
  • Douyin Skylark (lite, plus, pro, chat)
  • 360 GPT
  • LLaMa 2 (70b, 13b, 7b)
  • Code LLaMa (34b, 13b, 7b)
  • RWKV

📚 预览 | Screenshots

landspace feature latex generation shop subscription admin

📦 部署 | Deploy

部署成功后,管理员账号为 root,密码默认为 123456

  1. 编译安装 (自定义性强)
    git clone https://github.com/Deeptrain-Community/chatnio.git
    cd chatnio # project directory
    go build -o chatnio # build backend
    nohup ./chatnio > output.log & # run backend
    
    cd app # frontend directory (~/app)
    npm install -g pnpm # install pnpm
    pnpm install # install frontend dependencies
    pnpm build # build frontend
    
    # run frontend
    # a common way is to use nginx/apache to serve the static files
    

🔨 配置 | Config

~/config.yaml

mysql:
  db: chatnio
  host: localhost
  password: chatnio123456
  port: 3306
  user: root

redis:
  host: localhost
  port: 6379

secret: SbitdyN5ZH39cNxSrG3kMNZ1GfiyyQ43

auth:
  use_deeptrain: false

server:
  port: 8094
system:
  general:
    backend: ""
  mail:
    host: ""
    port: 465
    username: ""
    password: ""
    from: ""
  search:
    endpoint: https://duckduckgo-api.vercel.app
    query: 5

📚 开发文档 | Docs

开发文档

Key 中转服务 | Key Relay Service

  • 支持多模型兼容层,这意味着你可以使用一次代码,同时兼容多家 AI 模型
    • Support multi-model compatible layer, which means you can use one code to be compatible with multiple AI models at the same time
  • 支持多账户均衡负载,高并发
    • Support multi-account load balancing, high concurrency

https://api.openai.com 替换为 https://api.chatnio.net,填入控制台中的 API 设置 中的 API Key 即可使用

Replace https://api.openai.com with https://api.chatnio.net and fill in the API Key in the API Settings in the console to use

📦 技术栈 | Tech Stack

  • 前端: React + Radix UI + Tailwind CSS + Redux
  • 后端: Golang + Gin + Redis + MySQL + Tiktoken (OpenAI)
  • 应用技术: PWA + HTTP2 + WebSocket + Stream Buffer

🎃 贡献者 | Contributors

Contributors

📚 SDKs

其他项目 | Other Projects

📄 开源协议 | License

Apache License 2.0

❤ 捐助 | Sponsor

@4EvEr ¥1000