-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable vercel one click deployment (#10)
- Loading branch information
Showing
48 changed files
with
136 additions
and
162 deletions.
There are no files selected for viewing
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,64 @@ | ||
# GPT Lite | ||
|
||
A lightweight version of ChatGPT UI. Support both Open AI and Azure Open AI accounts | ||
English | [简体中文](./README.zh-CN.md) | ||
|
||
![demo](demo.jpg) | ||
GPT Lite is a web application that provides a fast ChatGPT user interface. It is built on top of Next.js and AntD. The app supports both Open AI and Azure Open AI accounts. | ||
|
||
# How to run locally | ||
Some example use cases for GPT Lite include: | ||
|
||
1. Clone the repo | ||
2. Install dependencies with `npm install` | ||
3. Run the app with `npm run dev` | ||
4. Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. | ||
- The free version ChatGPT site The web version is prone to disconnecting and requires refreshing. The Plus subscription at 20 USD/month may not be cost-effective for some users, deploy a customized webchat UI with API integration is a more economical option. | ||
- Deploy a customized chatgpt web app to exploring OpenAI's ChatGPT completion API. | ||
- Create a private web chatbot using ChatGPT for exclusive use among friends without sharing api key. | ||
- Learn developing web applications using OpenAI's API | ||
|
||
# How to deploy | ||
![demo](./docs/images/demo.jpg) | ||
|
||
To be updated | ||
## Prerequisites | ||
|
||
To use GPT Lite, you must have either an OpenAI account or an Azure Account | ||
|
||
## Running locally | ||
|
||
1. Ensure that NodeJS 18 is installed on your system. | ||
2. Clone the repository in your terminal. | ||
3. Install dependencies by running `npm install`. | ||
4. Verify that you have set the `OPENAI_API_KEY` environment variable correctly. | ||
5. Start the application with `npm run dev`. | ||
6. Open [http://localhost:3000](http://localhost:3000) in your web browser. | ||
|
||
## Deploy with Docker | ||
|
||
1. Clone the repository and go to the `app` subdirectory in your terminal. | ||
2. Update the `OPENAI_API_KEY` environment variables to the `docker-compose.yml` file. | ||
3. Build the application using `docker-compose build .` | ||
4. Start the application by running `docker-compose up -d`. | ||
|
||
## One click deploy on Vercel | ||
|
||
To easily connect GPT Lite to Vercel, simply click the button below. | ||
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fblrchen%2Fgptlite&env=OPENAI_API_KEY&project-name=gptlite&framework=nextjs&repository-name=gptlite) | ||
|
||
## Environment Variables | ||
|
||
The following environments are specific to OpenAI. | ||
|
||
| Name | Description | Default Value | | ||
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------- | --------------------- | | ||
| OPENAI_API_BASE_URL | Use this only if you intend to use a reserved proxy for `api.openai.com` | `https://api.openai.com` | | ||
| OPENAI_API_KEY | To obtain the secret key string for OpenAI, please visit the [OpenAI API](https://platform.openai.com/account/api-keys) website. | | | ||
|
||
The following environments are specific to Azure OpenAI. | ||
|
||
| Name | Description | | ||
| --------------------------- | -------------------------------------------------------- | | ||
| AZURE_OPENAI_API_BASE_URL | Endpoint, example format:`https://xxx.openai.azure.com` | | ||
| AZURE_OPENAI_API_KEY | Key | | ||
| AZURE_OPENAI_API_DEPLOYMENT | Model deployment name | | ||
|
||
## Contribution | ||
|
||
Welcome PRs of any size. | ||
|
||
# Disclaimers | ||
|
||
This code is intended solely for demonstration and testing purposes. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# ChatGPT-API Demo | ||
|
||
[English](./README.md) | 简体中文 | ||
|
||
GPT Lite是一个ChatGPT UI的第三方页面,使用Next.js和AntD实现,支持Open AI和Azure Open AI账户。 | ||
|
||
下面是一些GPT Lite的用途: | ||
- 虽然ChatGPT有官方网站,但是免费版非常容易断开连接并需要连续刷新,20美元/月的Plus订阅又很不划算,部署集成API的第三方UI程序是更经济的选择。 | ||
- 部署一个定制化ChatGPT程序以探索OpenAI's ChatGPT来研究ChatGPT的completion API,prompt提示词等。 | ||
- 部署一个方便家人朋友一起使用的ChatGPT程序,无须共享API密钥。 | ||
- 学习使用OpenAI API开发Web应用程序 | ||
|
||
![demo](./docs/images/demo.jpg) | ||
|
||
## 使用要求 | ||
|
||
要使用GPT Lite,必须拥有OpenAI帐户或Azure帐户。 | ||
|
||
## 在本地运行 | ||
|
||
1. 确保安装了NodeJS 18。 | ||
2. 打开命令行窗口里克隆代码。 | ||
3. 运行`npm install`来安装依赖项。 | ||
4. 确保设置了`OPENAI_API_KEY`环境变量。 | ||
5. 运行`npm run dev`启动应用程序。 | ||
6. 在Web浏览器中打开`http://localhost:3000`。 | ||
|
||
## 使用Docker部署 | ||
|
||
1. 打开命令行窗口里克隆代码。 | ||
2. 更新`docker-compose.yml`文件中里的`OPENAI_API_KEY`环境变量。 | ||
3. 运行`docker-compose build`构建。 | ||
4. 运行`docker-compose up -d`启动。 | ||
|
||
## Vercel一键部署 | ||
|
||
点击下列Deploy按钮即可一键部署至Vercel | ||
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fblrchen%2Fgptlite&env=OPENAI_API_KEY&project-name=gptlite&framework=nextjs&repository-name=gptlite) | ||
|
||
## 环境变量说明 | ||
|
||
以下是OpenAI相关的环境变量 | ||
|
||
| 名称 | 描述 | 默认值 | | ||
|---------------------|-------------------------------------------------------------------------------|----------------------| | ||
| OPENAI_API_BASE_URL | 反向代理 `api.openai.com` | `https://api.openai.com` | | ||
| OPENAI_API_KEY | OpenAI key,可以从[OpenAI API](https://platform.openai.com/account/api-keys)网站获取. | | | ||
|
||
以下是Azure OpenAI相关的环境变量 | ||
|
||
| Name | Description | | ||
| --------------------------- |------------------------------------------------| | ||
| AZURE_OPENAI_API_BASE_URL | 格式类似`https://xxx.openai.azure.com` | | ||
| AZURE_OPENAI_API_KEY | 密钥 | | ||
| AZURE_OPENAI_API_DEPLOYMENT | Model部署的名称 | | ||
|
||
|
||
## 贡献代码 | ||
|
||
欢迎各种PR,大小不限。Issue列表里所有带`Good First Issue`的issue都可以认领。 | ||
|
||
# 免责说明 | ||
|
||
此代码仅用于演示和测试目的。 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters