This commit is contained in:
黑墨水鱼 2024-01-01 17:52:20 +08:00 committed by GitHub
commit 057ade13fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions

View File

@ -211,6 +211,13 @@ docker-compose ps
### 部署第三方服务配合 One API 使用 ### 部署第三方服务配合 One API 使用
> 欢迎 PR 添加更多示例。 > 欢迎 PR 添加更多示例。
#### chatgpt-api-web
项目主页: <https://github.com/heimoshuiyu/chatgpt-api-web>
纯前端项目,所有信息保存在浏览器,无需部署。直接访问 <https://heimoshuiyu.github.io/chatgpt-api-web/> 填入参数开始使用。
或者可将参数填入 URL 中,格式: <https://heimoshuiyu.github.io/chatgpt-api-web/?key=sk-xxxxx&api=https://your-doname.com/v1/chat/completions>
#### ChatGPT Next Web #### ChatGPT Next Web
项目主页https://github.com/Yidadaa/ChatGPT-Next-Web 项目主页https://github.com/Yidadaa/ChatGPT-Next-Web

View File

@ -13,6 +13,7 @@ const COPY_OPTIONS = [
]; ];
const OPEN_LINK_OPTIONS = [ const OPEN_LINK_OPTIONS = [
{ key: 'chatgpt-api-web', text: 'chatgpt-api-web', value: 'chatgpt-api-web' },
{ key: 'ama', text: 'AMA 问天', value: 'ama' }, { key: 'ama', text: 'AMA 问天', value: 'ama' },
{ key: 'opencat', text: 'OpenCat', value: 'opencat' }, { key: 'opencat', text: 'OpenCat', value: 'opencat' },
]; ];
@ -144,6 +145,10 @@ const TokensTable = () => {
} }
let url; let url;
switch (type) { 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': case 'ama':
url = `ama://set-api-key?server=${encodedServerAddress}&key=sk-${key}`; url = `ama://set-api-key?server=${encodedServerAddress}&key=sk-${key}`;
break; break;