From 69558a321f45a7c70c0ac0ad0923658838ac4ab6 Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Fri, 25 Aug 2023 11:07:01 +0800 Subject: [PATCH 1/2] feat: add chatgpt-api-web link --- web/src/components/TokensTable.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/src/components/TokensTable.js b/web/src/components/TokensTable.js index b45f07df..c4fc018c 100644 --- a/web/src/components/TokensTable.js +++ b/web/src/components/TokensTable.js @@ -13,6 +13,7 @@ const COPY_OPTIONS = [ ]; const OPEN_LINK_OPTIONS = [ + { key: 'chatgpt-api-web', text: 'chatgpt-api-web', value: 'chatgpt-api-web' }, { key: 'ama', text: 'AMA 问天', value: 'ama' }, { key: 'opencat', text: 'OpenCat', value: 'opencat' }, ]; @@ -144,6 +145,10 @@ const TokensTable = () => { } let url; switch (type) { + case 'chatgpt-api-web': + url = `https://heimoshuiyu.github.io/chatgpt-api-web/?key=sk-${key}&api=${serverAddress}/v1/chat/completions` + break; + case 'ama': url = `ama://set-api-key?server=${encodedServerAddress}&key=sk-${key}`; break; From 36f12df4c3b8d12529f4fcb595b2bbd9ff3c7aaa Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Fri, 25 Aug 2023 11:07:12 +0800 Subject: [PATCH 2/2] feat: add chatgpt-api-web readme --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index 36841c79..a9581464 100644 --- a/README.md +++ b/README.md @@ -190,6 +190,13 @@ sudo service nginx restart ### 部署第三方服务配合 One API 使用 > 欢迎 PR 添加更多示例。 +#### chatgpt-api-web +项目主页: + +纯前端项目,所有信息保存在浏览器,无需部署。直接访问 填入参数开始使用。 + +或者可将参数填入 URL 中,格式: + #### ChatGPT Next Web 项目主页:https://github.com/Yidadaa/ChatGPT-Next-Web