feat: add chatgpt-api-web link

This commit is contained in:
heimoshuiyu 2023-08-25 11:07:01 +08:00
parent efeb9a16ce
commit 69558a321f
No known key found for this signature in database
GPG Key ID: 3D21029D108DC0E1

View File

@ -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;