diff --git a/index.html b/index.html index 8bda51e..9cc41c7 100644 --- a/index.html +++ b/index.html @@ -61,8 +61,6 @@ onchange="toggleCustomUrlInput()"> [官网线路]api.openai.com [CZLoapi线路]oapi.czl.net - [Cloudflare网关]不封号,查不了已用量 [群友CF反代]openai.996.lat [已前置https]自定义 diff --git a/static/js.js b/static/js.js index 8f68201..d8cd1c0 100644 --- a/static/js.js +++ b/static/js.js @@ -348,15 +348,13 @@ function sendRequest() { }) return; } else { - const apiUrl = customUrlInput.value.trim(); + apiUrl = customUrlInput.value.trim(); if (!apiUrl.startsWith("http://") && !apiUrl.startsWith("https://")) { apiUrl = "https://" + apiUrl; } - if (apiUrl.startsWith("https://gateway.ai.cloudflare.com")) { - apiUrl = apiUrl; // 如果用户输入的是https://gateway.ai.cloudflare.com开头,则不添加/v1 - } else { + if (!apiUrl.startsWith("https://gateway.ai.cloudflare.com")) { apiUrl += "/v1"; // 如果不是,则添加路径‘/v1’ } } @@ -371,6 +369,7 @@ function sendRequest() { } + let apiKeys = parseKeys(apiKeyInput.value); mdui.alert({