Sensei - Next Generation of MooGPT

MooGPT has been upgraded to Sensei, a well-designed cross-platform ChatGPT UI

Sensei - Next Generation of MooGPT

1. Background

MooGPT has been released for a while and recently I decided to upgrade it to another open source project. I will name it Sensei. Sensei in Japanese is also used as a title of honor for people who teach something and for specialists in their own fields.
Thanks to the original author of both awesome projects:
chatbot-ui
ChatGPT-Next-Web

2. Pre-requisite

  • Essentials
apt install git nginx certbot python3-certbot-nginx
curl -sSL https://get.docker.com/ | sh
systemctl enable docker

3. Deploy

  • I have pre-built the docker image. The docker registry is public.
mkdir sensei && cd sensei
nano docker-compose.yml
  • Sample compose file
version: '3.8'

services:
  sensei:
    image: harbor.henrywithu.com/sensei/sensei:20231002
    container_name: sensei
    ports:
      - "127.0.0.1:33333:3000"
    environment:
      - OPENAI_API_KEY=your_openai_api_key
      - CODE=your_access_code
      - DISABLE_GPT4=1 # If you want users to have gpt-4 model, just comment out this line.
  • Bring up the container
docker compose up -d

4. Nginx Setup

  • Create Nginx config file for Sensei
nano /etc/nginx/conf.d/sensei.conf
server {
    listen 80;
    server_name sensei.example.com; # match your own domain
    client_max_body_size 0;

    location / {
        proxy_pass http://127.0.0.1:33333;
        proxy_buffering off;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}
  • Issue SSL cert
certbot –nginx
  • Restart Nginx service
nginx -t
systemctl restart nginx
demo 1
demo 2

Copyright statement: Unless otherwise stated, all articles on this blog adopt the CC BY-NC-SA 4.0 license agreement. For non-commercial reprints and citations, please indicate the author: Henry, and original article URL. For commercial reprints, please contact the author for authorization.