Chatbot UI
A chat interface for interacting with AI models.
View the deployment · Run locally · Configure providers
An early self-hosted ChatGPT interface adapted so friends in Hong Kong could use a familiar chat workspace. It combines streaming responses with conversation history, reusable prompts, folders, model selection, and per-conversation controls.
The conversation workspace
- Stream model responses into a focused two-pane chat interface.
- Organize conversations and prompt templates into folders.
- Search chat history and save reusable system prompts.
- Choose a supported model and adjust temperature per conversation.
- Render Markdown, tables, math, and syntax-highlighted code.
- Import or export local conversation data.
- Use built-in localization files for a multilingual interface.
- Optionally enrich a request with Google Custom Search results.
Conversation history, folders, prompts, and user-supplied keys are managed in the browser. A deployment can also provide its own server-side OpenAI key.
Run it
git clone https://github.com/ChinesePrince07/chatbot-ui.git
cd chatbot-ui
npm install
cp .env.local.example .env.local 2>/dev/null || touch .env.local
npm run devOpen http://localhost:3000.
If the repository does not include .env.local.example, add the variables you
need from the table below directly to .env.local.
Configuration
| Variable | Default | Purpose |
|---|---|---|
OPENAI_API_KEY |
— | Server-provided OpenAI key; users can supply their own if omitted |
OPENAI_API_HOST |
https://api.openai.com |
OpenAI-compatible API base URL |
OPENAI_API_TYPE |
openai |
openai or azure |
OPENAI_API_VERSION |
2023-03-15-preview |
Azure API version |
AZURE_DEPLOYMENT_ID |
— | Azure deployment identifier |
OPENAI_ORGANIZATION |
— | Optional OpenAI organization |
DEFAULT_MODEL |
gpt-3.5-turbo |
Initial conversation model |
NEXT_PUBLIC_DEFAULT_SYSTEM_PROMPT |
built in | Initial system prompt |
GOOGLE_API_KEY |
— | Google Custom Search API key |
GOOGLE_CSE_ID |
— | Google Programmable Search engine ID |
Example:
OPENAI_API_KEY=your-key
OPENAI_API_HOST=https://api.openai.com
DEFAULT_MODEL=gpt-3.5-turboDo not commit .env.local.