{"id":27147952,"url":"https://github.com/heimoshuiyu/chatgpt-api-web","last_synced_at":"2025-09-07T01:34:00.798Z","repository":{"id":144701161,"uuid":"613877675","full_name":"heimoshuiyu/chatgpt-api-web","owner":"heimoshuiyu","description":"A pure front-end web application. It provides full API control, facilitating both daily use and development.","archived":false,"fork":false,"pushed_at":"2025-03-25T02:49:17.000Z","size":1389,"stargazers_count":33,"open_issues_count":3,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-04T07:38:24.342Z","etag":null,"topics":["chatgpt","chatgpt-api","openai","react","typescript"],"latest_commit_sha":null,"homepage":"https://heimoshuiyu.github.io/chatgpt-api-web/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/heimoshuiyu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-14T13:00:51.000Z","updated_at":"2025-03-28T10:20:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"720cda21-e69c-4b8c-9b79-943644823dbc","html_url":"https://github.com/heimoshuiyu/chatgpt-api-web","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimoshuiyu%2Fchatgpt-api-web","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimoshuiyu%2Fchatgpt-api-web/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimoshuiyu%2Fchatgpt-api-web/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/heimoshuiyu%2Fchatgpt-api-web/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/heimoshuiyu","download_url":"https://codeload.github.com/heimoshuiyu/chatgpt-api-web/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247838413,"owners_count":21004576,"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-api","openai","react","typescript"],"created_at":"2025-04-08T11:51:47.550Z","updated_at":"2025-04-08T11:51:48.118Z","avatar_url":"https://github.com/heimoshuiyu.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e 前排提示：滥用 API 或在不支持的地区调用 API 有被封号的风险 \u003chttps://github.com/zhayujie/chatgpt-on-wechat/issues/423\u003e\n\u003e\n\u003e 建议自行搭建代理中转 API 请求，然后更改对话设置中的 API Endpoint 参数使用中转\n\u003e\n\u003e 具体反向代理搭建教程请参阅此 [\u003e\u003eWiki 页面\u003c\u003c](https://github.com/heimoshuiyu/chatgpt-api-web/wiki)\n\n# ChatGPT API WEB\n\nChatGPT API WEB 是为 ChatGPT 的日常用户和 Prompt 工程师设计的项目。它让你方便地在 PC 和移动端浏览器上使用 ChatGPT，并根据需要调整系统 Prompt 和修改 OpenAI 接口参数。你还可以重复生成、编辑消息（包括用户消息与 AI 消息），以更好地与 ChatGPT 进行交互。\n\n无论你是 ChatGPT 的一般用户、想要定制 ChatGPT 的用户，还是 Prompt 工程师，这个项目都能满足你的需求。\n\n![build status](https://github.com/heimoshuiyu/chatgpt-api-web/actions/workflows/pages.yml/badge.svg)\n\n与官方 ChatGPT 相比：\n\n- API 调用速度更快更稳定\n- 对话记录、API 密钥等使用浏览器的 localStorage 保存在本地\n- 可编辑并删除对话消息\n- 可以导入/导出整个历史对话记录\n- 可以设置 system message (参见官方 [API 文档](https://platform.openai.com/docs/guides/chat)) 例如：\n  - \u003e You are a helpful assistant\n  - \u003e 你是一个专业英语翻译，把我说的话翻译成英语，为了保持通顺连贯可以适当修改内容。\n  - \u003e 根据我的要求撰写并修改商业文案\n  - \u003e ~~你是一个猫娘，你要用猫娘的语气说话~~\n- 可以为不同对话设置不同 APIKEY\n- 小（整个网页 30k 左右）\n- 可以设置不同的 API Endpoint（方便墙内人士使用反向代理转发 API 请求）\n- 支持 Whisper 语音转文字输入，将会使用历史对话记录和当前输入框内的文本作为 Prompt，提高专有名词识别率\n- 支持 TTS API\n- 支持 GPT-4v 图片输入\n\n## 屏幕截图\n\n![screenshot](./screenshot.webp)\n\n## 使用\n\n以下任意方式都可：\n\n- 访问 github pages 部署 \u003chttps://heimoshuiyu.github.io/chatgpt-api-web/\u003e\n- 从 [release](https://github.com/heimoshuiyu/chatgpt-api-web/releases) 下载网页文件，或在 [github pages](https://heimoshuiyu.github.io/chatgpt-api-web/) 按 `ctrl+s` 保存网页，然后双击打开\n- 自行编译构建网页\n\n### 默认参数继承\n\n新建会话将会使用 URL 中设置的默认参数。\n\n如果 URL 没有设置该参数，则使用 **目前选中的会话** 的参数\n\n### 更改默认参数\n\n- `key`: OPENAI API KEY 默认为空\n- `sys`: system message 默认为 \"你是一个猫娘，你要模仿猫娘的语气说话\"\n- `api`: API Endpoint 默认为 `https://api.openai.com/v1/chat/completions`\n- `mode`: `fetch` 或 `stream` 模式，stream 模式下可以动态看到 api 返回的数据，但无法得知 token 数量，只能进行估算，在 token 数量过多时可能会裁切过多或过少历史消息\n- `dev`: true / false 开发模式，这个模式下可以看到并调整更多参数\n- `temp`: 温度，默认 1\n- `whisper-api`: Whisper 语音转文字服务 API, 只有设置了此值后才会显示语音转文字按钮\n- `whisper-key`: 用于 Whisper 服务的 key，如果留空则默认使用上方的 OPENAI API KEY\n\n例如 `http://localhost:1234/?key=xxxx\u0026api=xxxx` 那么 **新创建** 的会话将会使用该默认 API 和 API Endpoint\n\n以上参数应用于单个对话，随时可在顶部更改\n\n## 自行编译构建网页\n\n```bash\nyarn install\nyarn build\n```\n\n构建产物在 `dist` 文件夹中\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheimoshuiyu%2Fchatgpt-api-web","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fheimoshuiyu%2Fchatgpt-api-web","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fheimoshuiyu%2Fchatgpt-api-web/lists"}