- Notifications
You must be signed in to change notification settings - Fork51
Lightweight chatgpt bot built using Next.js and the OpenAI Streaming API. 一个使用 Next.js 和 OpenAI Streaming API 创建的简易ChatGPT聊天机器人
License
blrchen/chatgpt-minimal
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
English |简体中文
Visit theChatGPT Minimal Demo Site
ChatGPT Minimal is a lightweight chatbot built using Next.js and the OpenAI Streaming API for the GPT-3.5 model. It supports both OpenAI and Azure OpenAI accounts.
Components:
- Next.js v13
- OpenAI Streaming API (GPT-3.5 model, gpt-3.5-turbo)
- API Routes
- Chatbot UI with React and Ant Design
For a full-featured ChatGPT UI codebase, visitChatGPT Lite.
You need an OpenAI or Azure OpenAI account.
Refer to theEnvironment Variables section for required environment variables.
Click the button below to deploy on Vercel:
For OpenAI account users:
docker run -d -p 3000:3000 \ -e OPENAI_API_KEY="<REPLACE-ME>" \ blrchen/chatgpt-minimal
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-minimal
- Install NodeJS 20.
- Clone the repository.
- Install dependencies with
npm install
. - Copy
.env.example
to.env.local
and modify environment variables as needed. - Start the application using
npm run dev
. - Open
http://localhost:3000
in your browser.
- Clone the repository and go to the root directory.
- Update the
OPENAI_API_KEY
environment variable in thedocker-compose.yml
file. - Build the application using
docker-compose build .
. - Start the application by running
docker-compose up -d
.
Required environment variables:
For OpenAI account:
Name | Description | Default Value |
---|---|---|
OPENAI_API_BASE_URL | Use if you intend to use a reverse proxy forapi.openai.com . | https://api.openai.com |
OPENAI_API_KEY | Secret key string obtained from theOpenAI API website. |
For Azure OpenAI account:
Name | Description |
---|---|
AZURE_OPENAI_API_BASE_URL | Endpoint (e.g.,https://xxx.openai.azure.com). |
AZURE_OPENAI_API_KEY | Key |
AZURE_OPENAI_DEPLOYMENT | Model deployment name |
We welcome PRs of all sizes.
About
Lightweight chatgpt bot built using Next.js and the OpenAI Streaming API. 一个使用 Next.js 和 OpenAI Streaming API 创建的简易ChatGPT聊天机器人
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.