Home

Awesome

ChatGPT Lite

English | 简体中文

Demo

Visit the ChatGPT Lite Demo Site

Features

ChatGPT Lite is a lightweight ChatGPT web interface developed using Next.js and the OpenAI Chat API. It's compatible with both OpenAI and Azure OpenAI accounts.

demo

For a beginner-friendly version of the ChatGPT UI codebase, visit ChatGPT Minimal.

Prerequisites

You need an OpenAI or Azure OpenAI account.

Deployment

Refer to the Environment Variables section for necessary environment variables.

Deploy on Vercel

Click the button below to deploy on Vercel:

Deploy with Vercel

Deploy with Docker

For OpenAI account users:

docker run -d -p 3000:3000 \
   -e OPENAI_API_KEY="<REPLACE-ME>" \
   blrchen/chatgpt-lite

For Azure OpenAI account users:

docker run -d -p 3000:3000 \
   -e AZURE_OPENAI_API_BASE_URL="<REPLACE-ME>" \
   -e AZURE_OPENAI_API_KEY="<REPLACE-ME>" \
   -e AZURE_OPENAI_DEPLOYMENT="<REPLACE-ME>" \
   blrchen/chatgpt-lite

Development

Running Locally

  1. Install NodeJS 20.
  2. Clone the repository.
  3. Install dependencies with npm install.
  4. Copy .env.example to .env.local and update environment variables.
  5. Start the application using npm run dev.
  6. Visit http://localhost:3000 in your browser.

Running Locally with Docker

  1. Clone the repository and navigate to the root directory.
  2. Update the OPENAI_API_KEY environment variable in the docker-compose.yml file.
  3. Build the application using docker-compose build ..
  4. Start it by running docker-compose up -d.

Environment Variables

Required environment variables:

For OpenAI account:

NameDescriptionDefault Value
OPENAI_API_BASE_URLUse if you plan to use a reverse proxy for api.openai.com.https://api.openai.com
OPENAI_API_KEYSecret key string obtained from the OpenAI API website.
OPENAI_MODELModel of GPT usedgpt-3.5-turbo

For Azure OpenAI account:

NameDescription
AZURE_OPENAI_API_BASE_URLEndpoint (e.g., https://xxx.openai.azure.com).
AZURE_OPENAI_API_KEYKey
AZURE_OPENAI_DEPLOYMENTModel deployment name

Contribution

PRs of all sizes are welcome.