From 69558a321f45a7c70c0ac0ad0923658838ac4ab6 Mon Sep 17 00:00:00 2001 From: heimoshuiyu Date: Fri, 25 Aug 2023 11:07:01 +0800 Subject: [PATCH] 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;