From efff200e2393d0a3d054e7f54902a8dffc8ed956 Mon Sep 17 00:00:00 2001 From: wood Date: Sat, 22 Jul 2023 01:16:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A032K=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index 7110f93..52e71d1 100644 --- a/index.html +++ b/index.html @@ -264,7 +264,7 @@ border-collapse: collapse; width: 100%; margin-top: 20px; - font-size: 14px; + font-size: 10px; border-radius: 5px; border: none; overflow: hidden; @@ -360,7 +360,7 @@ @@ -373,13 +373,14 @@ 序号 - API KEY + API KEY 总额度 已使用 剩余量 已用比例 到期时间 GPT-4 + 32K 绑卡 组织ID @@ -432,6 +433,7 @@ const gpt4CheckResponse = await fetch(gpt4Check, { headers }); const gpt4CheckData = await gpt4CheckResponse.json(); let GPT4CheckResult = Array.isArray(gpt4CheckData.data) && gpt4CheckData.data.some(item => item.id.includes('gpt-4')) ? '✅' : '❌'; + let GPT432kCheckResult = Array.isArray(gpt4CheckData.data) && gpt4CheckData.data.some(item => item.id.includes('gpt-4-32k')) ? '✅' : '❌'; let isSubscrible = subscriptionData.plan.id.includes('payg') ? '✅' : '❌'; if (totalAmount > 20) { @@ -461,10 +463,10 @@ setid = setiddata.data[0].id; } - return [totalAmount, totalUsage, remaining, formattedDate, GPT4CheckResult, isSubscrible, setid]; + return [totalAmount, totalUsage, remaining, formattedDate, GPT4CheckResult, GPT432kCheckResult,isSubscrible, setid]; } catch (error) { console.error(error); - return ["Error", null, null, null, null, null, null]; + return ["Error", null, null, null, null,null, null, null]; } } @@ -534,7 +536,7 @@ row.appendChild(serialNumberCell); // 将序列号单元格添加到行中 let apiKeyCell = document.createElement("td"); - apiKeyCell.textContent = apiKey; + apiKeyCell.textContent = apiKey.replace(/^(sk-[a-zA-Z0-9]{4})[a-zA-Z0-9]*(.{6})$/, "$1***$2"); row.appendChild(apiKeyCell); console.log(data); // 添加 console.log 以查看 data 的值 @@ -588,12 +590,16 @@ GPT4CheckResult.textContent = data[4]; row.appendChild(GPT4CheckResult); + let GPT432kCheckResult = document.createElement("td"); + GPT432kCheckResult.textContent = data[5]; + row.appendChild(GPT432kCheckResult); + let isSubscribe = document.createElement("td"); - isSubscribe.textContent = data[5]; + isSubscribe.textContent = data[6]; row.appendChild(isSubscribe); let setidCell = document.createElement("td"); - setidCell.textContent = data[6]; // 使用data[6]来获取组织ID + setidCell.textContent = data[7]; row.appendChild(setidCell); }