Home

Awesome

<h2 align="center">ChatGPT-Vercel</h2> <p align="center"> <a href="https://github.com/GPTGenius/chatgpt-vercel/tags"> <img alt="GitHub tag (latest by date)" src="https://img.shields.io/github/v/release/GPTGenius/chatgpt-vercel"> </a> <img alt="node-current (scoped)" src="https://img.shields.io/node/v/replicate-fetch"> <a href="https://github.com/GPTGenius/chatgpt-vercel/blob/main/LICENSE"> <img alt="license" src="https://img.shields.io/github/license/GPTGenius/chatgpt-vercel"> </a> </p>

English | 简体中文

Introduction

Create a private ChatGPT website with one-click for free using Vercel, support muti text / images generation conversations. Powered by OpenAI API GPT-4/3.5 and Vercel.

Features

Live Demo

User Guide

You can access the online demo above or deploy it privately for experience.

Conversation

Click the icon at the top left to add a conversation, which has two types:

History record

When Save all conversations is enabled in the global settings, it will be saved to local cache. By default, it will not be saved.

Operation

All settings

see Configurations

Getting Started

1. Create Project

Create Vercel project from a github forked project(recommand) or the following Deploy button.

Deploy with Vercel

2. Set OPENAI_API_KEY

There are three ways to set your OpenAI API Key:

Attention: For Vercel, all environment variables need to be redeployed to take effect.

3. Set Midjourney (optional)

If you want to use the AI drawing feature of Midjourney, you can configure the relevant Discord settings , including the following fields:

How to get ids and token:

You can visit midjourney-cookbook to get some samples about Midjourney prompts.

4. Keep code synchronized (optional)

see Sync Fork

Other deployment methods

Run pnpm build and pnpm run server. Refer: astro-node

Configurations

Deployment Configurations

All deployment configurations could be configured in the .env file or in Environment Variables of Vercel

ConfigurationDefault ValueDescription
PASSWORD-Website access password
OPENAI_API_KEY-Key for API request, multiple keys are supported, separated by commas, how to generate
LANGUAGEenThe default language of the website, including prompts. Supported languages: zh/en
API_KEY_STRATEGYrandomThe scheduling strategy mode for multiple keys: polling/random
OPENAI_API_BASE_URLapi.openai.comThe default address of the requested api
DISCORD_SERVER_ID-Discord server id
DISCORD_CHANNEL_ID-Discord channel id
DISCORD_TOKEN-Discord token
DISCORD_IMAGE_PROXY-Discord image proxy url

Global Configurations

All global configurations will be stored locally

ConfigurationDefault ValueDescription
OpenAI Api Key-Only a single key is supported. If it is configured on the page, the key in the environment variable will not be used
LanguageenThe language of the website, including prompts. Supported languages: zh/en
Save all conversationstrueThe conversation won't be lost after the page is refreshed
Temperature1The larger the value, the more random the answer, with a range of 0-2
Text Conversation Modelgpt-3.5-turboModel used in api request, supported models
Continuous conversationstrueCarry the context for the conversations
Number of historical messages carried4For continuous conversations, the number of historical messages carried
Image Generation Conversation ModelDALL-ESupported models: DALL-E / Midjourney / Replicate
Number of generated images1The number of images generated in a single image generation conversation
Size of generated images256x256The size of a single image in image generation conversation
Discord Server Id-If it is configured on the page, the key in the environment variable will not be used
Discord Channel Id-Ditto
Discord Token-Ditto

Planned Features

These are some of the planned features to be developed. Collaborations are welcome, and feel free to suggest other ideas by submitting issues.

Development

Requirements:

Proxy

Development:

Build:

Contribution

Any contributions are highly appreciated. Here are some tips:

Credits

Star History

Star History Chart

License

Based on MIT License