{"id":14957359,"url":"https://github.com/liuw5367/chatgpt-web","last_synced_at":"2025-09-15T07:32:29.970Z","repository":{"id":133949215,"uuid":"612019471","full_name":"liuw5367/chatgpt-web","owner":"liuw5367","description":"ChatGPT web application.  ChatGPT 网页应用，支持多对话、海量提示词、PWA、ASR、TTS","archived":false,"fork":false,"pushed_at":"2024-09-08T11:57:53.000Z","size":2635,"stargazers_count":129,"open_issues_count":2,"forks_count":28,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-08-07T14:49:15.318Z","etag":null,"topics":["asr","astro","astrojs","chatgpt","gpt","next","openai","pwa","react","tts","typescript"],"latest_commit_sha":null,"homepage":"https://chatgpt-light.netlify.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/liuw5367.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-10T02:47:48.000Z","updated_at":"2025-07-25T02:10:37.000Z","dependencies_parsed_at":"2023-12-30T14:27:23.260Z","dependency_job_id":"9540d6dd-1a18-478c-a48f-093a1d30714d","html_url":"https://github.com/liuw5367/chatgpt-web","commit_stats":{"total_commits":147,"total_committers":2,"mean_commits":73.5,"dds":0.006802721088435382,"last_synced_commit":"576d10336b68fb69d0c562befb1838c6b1f27aa3"},"previous_names":["liuw5367/chatgpt-web","liuw5367/chatgpt-asr-tts"],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/liuw5367/chatgpt-web","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuw5367%2Fchatgpt-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuw5367%2Fchatgpt-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuw5367%2Fchatgpt-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuw5367%2Fchatgpt-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/liuw5367","download_url":"https://codeload.github.com/liuw5367/chatgpt-web/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/liuw5367%2Fchatgpt-web/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270977788,"owners_count":24678778,"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","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["asr","astro","astrojs","chatgpt","gpt","next","openai","pwa","react","tts","typescript"],"created_at":"2024-09-24T13:14:47.616Z","updated_at":"2025-08-18T10:18:37.428Z","avatar_url":"https://github.com/liuw5367.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ChatGPT\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/liuw5367/chatgpt-web) [![Deploy with Netlify](https://www.netlify.com/img/deploy/button.svg)](https://app.netlify.com/start/deploy?repository=https://github.com/liuw5367/chatgpt-web)\n\n[Astro 分支](https://github.com/liuw5367/chatgpt-web/tree/astro)和[主分支](https://github.com/liuw5367/chatgpt-web)代码同步，只是框架不同。\n\n可自行选择部署的分支：\n\n- Next 分支\n\n  - [Next 分支体验地址 Vercel](https://chatgpt-six-lilac.vercel.app)\n  - [Next 分支体验地址 Netlify](https://chatgpt-light.netlify.app)\n\n- Astro 分支首次加载时白屏时间长一点\n  - [Astro 分支体验地址](https://chatgpt-astro.netlify.app)\n\n## 截图\n\n\u003cdiv style=\"display:flex; justify-content:space-around;\"\u003e\n    \u003cimg src=\"./screenshot-dark.png\" alt=\"Screenshot 1\" style=\"width:45%;\"\u003e\n    \u003cimg src=\"./screenshot-light.png\" alt=\"Screenshot 2\" style=\"width:45%;\"\u003e\n\u003c/div\u003e\n\n## 功能\n\n- 对话使用 OpenAI API `/v1/chat/completions`\n- 图片生成 OpenAI API `/v1/images/generations`\n- 支持设置 prompt，提供大量模版供选择\n- 页面样式移动端优先\n- 支持设置访问密码\n- 支持 prompt 收藏、导入、导出（浏览器本地缓存）\n- 支持多会话\n- 支持连续对话\n- 消息显示 token 使用数量\n- 支持配置模型\n- 支持夜间模式\n- 支持对话内容复制\n- 支持代码复制\n- 输入 `/` 搜索 Prompt\n- 支持 i18n\n- 支持 语音识别ASR 和 语音合成TTS，使用浏览器API\n\n## 使用介绍\n\n- 页面中保存的 OPENAI KEY 会明文保存在 localstorage\n- 消息列表以 json 形式保存在 localstorage\n- 页面中保存的 API KEY 会明文传输进行请求\n- 输入框为空时，按上箭头将填充上一条消息内容\n\n### 提示词\n\n- 如果 prompt 最后一句带有问句，个人建议将该问句从 prompt 删除，将其填入消息内容框内，不然每次对话的时候，该问句都会跟随 system prompt 一起发送\n- 配置 system prompt 后页面底部的设置按钮会高亮\n- 消息和回复底部会显示`PROMPT`的标签，点击会复制并显示该 prompt\n- 击消息底部的重试按钮，会恢复对应的 system prompt 并更新 localStorage 的值\n- 有 prompt 时未填写消息内容，可点击发送按钮。因内容为空，为便于查看，列表中内容区域会显示为 system prompt\n\n### 连续对话\n\n1. 开启后底部按钮高亮，消息会带有 conversionId\n2. 每次对话都会从页面消息列表查找对应 conversionId 的消息\n3. 发送的消息和回复会带有图标，用来辨别该内容是否为连续对话\n4. 连续对话会根据 conversionId 从列表中寻找历史会话消息\n5. 点击消息底部的重试按钮，会继续使用对应的 conversionId 延续对话。即使这条消息和历史对话消息中间穿插着对话其他消息\n6. 连续对话会添加 token 限制，会保留最低 1000 个 token 给回复使用\n7. 取最新的消息，超出 token 限制的历史消息会被舍弃\n8. 已添加 gpt-4 token 数判断\n\n## 环境变量\n\n以下是支持的环境变量，非 `PUBLIC_` 开头的环境变量只在 `/pages/api/` 调用\n\n- `OPENAI_API_KEY`\n- `OPENAI_API_HOST`\n- `OPENAI_API_MODEL`\n\n设置访问密码：\n\n- `ACCESS_CODE`\n\n## 感谢\n\n- [ddiu8081 / chatgpt-demo](https://github.com/ddiu8081/chatgpt-demo)\n- [rockbenben / ChatGPT-Shortcut](https://github.com/rockbenben/ChatGPT-Shortcut)\n- [PlexPt / awesome-chatgpt-prompts-zh](https://github.com/PlexPt/awesome-chatgpt-prompts-zh)\n- [f/awesome-chatgpt-prompts](https://github.com/f/awesome-chatgpt-prompts)\n- [timqian/openprompt.co](https://github.com/timqian/openprompt.co)\n- [GaiZhenbiao / ChuanhuChatGPT](https://github.com/GaiZhenbiao/ChuanhuChatGPT)\n\n依赖库\n\n- nextjs\n- react\n- chakra-ui\n- tabler icon\n- zustand\n- unocss\n- markdown-it\n- github-markdown-css\n- ahooks\n- gpt3-tokenizer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliuw5367%2Fchatgpt-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fliuw5367%2Fchatgpt-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fliuw5367%2Fchatgpt-web/lists"}