{"id":21201906,"url":"https://github.com/gptgenius/chatgpt-vercel","last_synced_at":"2025-05-16T18:03:40.804Z","repository":{"id":263402967,"uuid":"614180119","full_name":"GPTGenius/chatgpt-vercel","owner":"GPTGenius","description":"Create a private chatgpt website via vercel","archived":false,"fork":false,"pushed_at":"2024-01-28T10:54:54.000Z","size":3324,"stargazers_count":557,"open_issues_count":16,"forks_count":399,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-04-03T15:11:24.330Z","etag":null,"topics":["chatgpt","chatgpt-app","chatgpt3","chatgpt4","midjourney","openai","vercel","vercel-deployment"],"latest_commit_sha":null,"homepage":"https://chatgpt-vercel-sample.vercel.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GPTGenius.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-15T03:50:40.000Z","updated_at":"2025-03-11T16:00:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"34941c4d-57af-4192-bc6e-314c40d9af9b","html_url":"https://github.com/GPTGenius/chatgpt-vercel","commit_stats":null,"previous_names":["gptgenius/chatgpt-vercel"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPTGenius%2Fchatgpt-vercel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPTGenius%2Fchatgpt-vercel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPTGenius%2Fchatgpt-vercel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPTGenius%2Fchatgpt-vercel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GPTGenius","download_url":"https://codeload.github.com/GPTGenius/chatgpt-vercel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248597544,"owners_count":21130896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chatgpt","chatgpt-app","chatgpt3","chatgpt4","midjourney","openai","vercel","vercel-deployment"],"created_at":"2024-11-20T20:12:00.953Z","updated_at":"2025-04-12T16:37:00.198Z","avatar_url":"https://github.com/GPTGenius.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](assets/preview.png)\n\n\u003ch2 align=\"center\"\u003eChatGPT-Vercel\u003c/h2\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/GPTGenius/chatgpt-vercel/tags\"\u003e\n    \u003cimg alt=\"GitHub tag (latest by date)\" src=\"https://img.shields.io/github/v/release/GPTGenius/chatgpt-vercel\"\u003e\n  \u003c/a\u003e\n  \u003cimg alt=\"node-current (scoped)\" src=\"https://img.shields.io/node/v/replicate-fetch\"\u003e\n  \u003ca href=\"https://github.com/GPTGenius/chatgpt-vercel/blob/main/LICENSE\"\u003e\n    \u003cimg alt=\"license\" src=\"https://img.shields.io/github/license/GPTGenius/chatgpt-vercel\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\nEnglish | [简体中文](./README.zh-CN.md)\n\n## Introduction\nCreate 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.\n\n## Features\n- ⚡ Deploy quickly and for free using Vercel\n- 💬 Text conversation with the ability to switch models and set context length\n- 🎨 Image generation conversation supports the `DALL-E` and `Midjourney` models. It also allows for the adjustment of image size and count.\n- 🌈 Multiple preset prompts added to customize AI behavior\n- 🌏 Switch between various languages, currently supporting Simplified Chinese and English\n- 💭 Local chat history saved with search, import and export functionality\n\n## Live Demo\n- [chatgpt-vercel-sample](https://chatgpt-vercel-sample.vercel.app/)\n- [chatgpt-vercel-zh-sample](https://chatgpt-vercel-zh-sample.vercel.app/)\n\n## User Guide\nYou can access the online demo above or deploy it privately for experience.\n\n### Conversation\nClick the icon at the top left to add a conversation, which has two types:\n- Text conversation:\n  - The model is switchable, [supported models](https://platform.openai.com/docs/models/model-endpoint-compatibility)\n  - By default, it is a continuous conversation, and each sending will carry part of context.\n  - Supports adding preset prompts, type `/` or click the button at the bottom left to add.\n  - Supports model configuration, click the settings icon at the top right to configure.\n- Image generation conversation:\n  - The model is switchable, supports the OpenAI `DALL·E` model and `Midjourney` \n  - Does not support continuous conversation, and each sending will not carry the context.\n  - Directly input the image effect you want, for example: `a cat`.\n  - For model `DALL-E`, expend `OpenAI` tokens. The effective access time for the image link is `2` hours. Please make sure to save it in time if necessary.\n  - For model `Midjourney`, depending on the `Discord` configurations, image generation may take a while, with a default timeout of `5` minutes. Please be patient and wait.\n\n### History record\nWhen `Save all conversations` is enabled in the global settings, it will be saved to local cache. By default, it will not be saved.\n\n### Operation\n- Press `Enter` to send\n- Press `Shift`+`Enter` to line break\n- Enter `/` to add preset prompts, and searching is also supported.\n\n### All settings\nsee [Configurations](#Configurations)\n\n## Getting Started\n\n### 1. Create Project\nCreate Vercel project from a github forked project(recommand) or the following **Deploy** button.\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/GPTGenius/chatgpt-vercel\u0026env=OPENAI_API_KEY)\n\n### 2. Set OPENAI_API_KEY\nThere are three ways to set your OpenAI API Key:\n- Set Vercel Environment Variables **OPENAI_API_KEY**\n- Rename your `.env.expample` file to `.env` and set **OPENAI_API_KEY**\n- Set **OPENAI_API_KEY** within the page\n\n\u003e Attention: For Vercel, all environment variables need to be redeployed to take effect.\n\n### 3. Set Midjourney (optional)\nIf you want to use the AI drawing feature of `Midjourney`, you can configure the relevant `Discord` settings , including the following fields:\n- `DISCORD_SERVER_ID`\n- `DISCORD_CHANNEL_ID`\n- `DISCORD_TOKEN`\n\nHow to get ids and token:\n- [How to find ids](https://docs.statbot.net/docs/faq/general/how-find-id/)\n- [Get discord token](https://www.androidauthority.com/get-discord-token-3149920/)\n\nYou can visit [midjourney-cookbook](https://gptgenius.github.io/midjourney-cookbook/) to get some samples about `Midjourney` prompts.\n\n### 4. Keep code synchronized (optional)\nsee [Sync Fork](docs/sync.md)\n\n## Other deployment methods\nRun `pnpm build` and `pnpm run server`. Refer: [astro-node](https://docs.astro.build/en/guides/integrations-guide/node/#standalone)\n\n## Configurations\n### Deployment Configurations\nAll deployment configurations could be configured in the `.env` file or in **Environment Variables** of Vercel\n\n| Configuration       | Default Value  | Description                                                                                                                           | \n| ------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------- |\n| PASSWORD            | -              | Website access password                                                                                                               |\n| OPENAI_API_KEY      | -              | Key for API request, multiple keys are supported, separated by commas, [how to generate](https://platform.openai.com/account/api-keys)|\n| LANGUAGE            | en             | The default language of the website, including prompts. Supported languages: **zh**/**en**                                            |\n| API_KEY_STRATEGY    | random         | The scheduling strategy mode for multiple keys: **polling**/**random**                                                                |\n| OPENAI_API_BASE_URL | api.openai.com | The default address of the requested api                                                                                              |\n| DISCORD_SERVER_ID   | -              | Discord server id                                                                                                                     |\n| DISCORD_CHANNEL_ID  | -              | Discord channel id                                                                                                                    |\n| DISCORD_TOKEN       | -              | Discord token                                                                                                                         |\n| DISCORD_IMAGE_PROXY | -              | Discord image proxy url                                                                                                               |  \n\n\n### Global Configurations\nAll global configurations will be stored locally\n\n| Configuration                         | Default Value | Description                                                                                                           |\n| ------------------------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------- |\n| 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 |\n| Language                              | en            | The language of the website, including prompts. Supported languages: **zh**/**en**                                    |\n| Save all conversations                | true          | The conversation won't be lost after the page is refreshed                                                            |\n| Temperature                           | 1             | The larger the value, the more random the answer, with a range of 0-2                                                 |\n| Text Conversation Model               | gpt-3.5-turbo | Model used in api request, [supported models](https://platform.openai.com/docs/models/model-endpoint-compatibility)   |\n| Continuous conversations              | true          | Carry the context for the conversations                                                                               |\n| Number of historical messages carried | 4             | For continuous conversations, the number of historical messages carried                                               |\n| Image Generation Conversation Model   | DALL-E        | Supported models: **DALL-E** / **Midjourney** / **Replicate**                                                         |\n| Number of generated images            | 1             | The number of images generated in a single image generation conversation                                              |\n| Size of generated images              | 256x256       | The size of a single image in image generation conversation                                                           |\n| Discord Server Id                     | -             | If it is configured on the page, the key in the environment variable will not be used                                 |\n| Discord Channel Id                    | -             | Ditto                                                                                                                 |\n| Discord Token                         | -             | Ditto                                                                                                                 |  \n\n## Planned Features\n- [ ] Export functionality to export as markdown and images\n- [ ] Theme color switching support, currently defaulting to gradient purple\n- [ ] Audio conversation support\n- [x] Image generation using other models\n\nThese are some of the planned features to be developed. Collaborations are welcome, and feel free to suggest other ideas by submitting issues.\n\n## Development\nRequirements:\n- **NodeJS** `v18` or higher\n- **pnpm** `v7` or higher\n\nProxy\n- By default, a custom proxy is used to request openapi locally, and `LOCAL_PROXY` needs to be set in `.env`. There is currently no default proxy, so if you choose to set up a proxy, you assume the associated risks.\n- If there is no need for a proxy, you can disable local proxy by setting `DISABLE_LOCAL_PROXY=true` in the `.env` file. At this point, `api.openai.com` will be directly requested.\n\nDevelopment:\n- Run `pnpm dev`\n- Expose port, for example, when using in cloud ide, run `pnpm start`\n\nBuild:\n- Run `pnpm build`\n\n## Contribution\nAny contributions are highly appreciated. Here are some tips:\n- To improve the translation or add a new language, modify the `lang` directory. If adding a new language, you will also need to modify `src/utils/i18n.ts`.\n- To improve or add new preset prompts, modify the `prompts` directory.\n- To optimize the API, modify the `src/pages/api` directory.\n- To optimize page interactions, modify the `src/modules` directory.\n- For new feature support, please open an issue directly.\n\n## Credits\n- English prompts are modified from [awesome-chatgpt-prompts](https://github.com/f/awesome-chatgpt-prompts)\n- Chinese prompts are modified from [awesome-chatgpt-prompts-zh](https://github.com/PlexPt/awesome-chatgpt-prompts-zh)\n\n## Star History\n\n[![Star History Chart](https://api.star-history.com/svg?repos=GPTGenius/chatgpt-vercel\u0026type=Date)](https://star-history.com/#GPTGenius/chatgpt-vercel\u0026Date)\n\n## License\nBased on [MIT License](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgptgenius%2Fchatgpt-vercel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgptgenius%2Fchatgpt-vercel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgptgenius%2Fchatgpt-vercel/lists"}