From 8eb0db8401a618e26417a5ad072607bc6f1e69a9 Mon Sep 17 00:00:00 2001 From: aixianling Date: Mon, 12 Jun 2023 17:27:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=85=A5=E6=9C=AC=E5=9C=B0=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/settings.vue | 10 +++-- src/utils/models.js | 74 +++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+), 4 deletions(-) diff --git a/src/components/settings.vue b/src/components/settings.vue index 607aae9..4987f3e 100644 --- a/src/components/settings.vue +++ b/src/components/settings.vue @@ -16,7 +16,7 @@ 应用 - + {{ account.username }} {{ [account.usage, account.total].join(" / ") }} 刷新 @@ -57,7 +57,8 @@ export default { models: () => Object.values(models), account: v => v.settings.account || {usage: 0, total: 0}, apiKey: v => v.settings.model.apiKey || "key无效或网络波动,请重新尝试", - isGPT: v => v.settings.model.name == "ChatGPT" + isGPT: v => v.settings.model.name == "ChatGPT", + isLocal: v => typeof v.settings.model?.getAccount != "function" }, methods: { initModel(model) { @@ -66,7 +67,7 @@ export default { if (ins.apiKey) { clearInterval(timer) this.settings.model = ins - this.getModelAccount() + !this.isLocal && this.getModelAccount() } }, 500) }, @@ -83,8 +84,8 @@ export default {