From 200d39281998670d19afeae9df45557adbcc8d99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B8=A6=E5=A5=97=E7=9A=84=E8=80=81=E7=8E=8B?= <1836744277@qq.com> Date: Thu, 27 Mar 2025 21:55:14 +0800 Subject: [PATCH] =?UTF-8?q?update:=20glm4=E6=96=B0=E5=A2=9Eplus=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E5=BC=80=E5=85=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/ChatGLM4Client.js | 2 ++ guoba.support.js | 6 ++++++ model/core.js | 3 ++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/client/ChatGLM4Client.js b/client/ChatGLM4Client.js index a6937f3..069469c 100644 --- a/client/ChatGLM4Client.js +++ b/client/ChatGLM4Client.js @@ -12,6 +12,7 @@ export class ChatGLM4Client extends BaseClient { this.supportFunction = false this.debug = props.debug this._refreshToken = props.refreshToken + this.if_plus_model = props.if_plus_model || false } async getAccessToken (refreshToken = this._refreshToken) { @@ -61,6 +62,7 @@ export class ChatGLM4Client extends BaseClient { meta_data: { is_test: false, input_question_type: 'xxxx', + if_plus_model: this.if_plus_model, channel: '' }, messages: [ diff --git a/guoba.support.js b/guoba.support.js index f14782f..61652e7 100644 --- a/guoba.support.js +++ b/guoba.support.js @@ -316,6 +316,12 @@ export function supportGuoba () { bottomHelpMessage: 'chatglm_refresh_token 6个月有效期', component: 'Input' }, + { + field: 'if_plus_model', + label: 'PLUS模式', + bottomHelpMessage: '更聪明,更全面', + component: 'Switch' + }, { label: '以下为Claude API方式的配置', component: 'Divider' diff --git a/model/core.js b/model/core.js index a2ca604..fb5a816 100644 --- a/model/core.js +++ b/model/core.js @@ -595,7 +595,8 @@ class Core { return await client.sendMessage(prompt, option) } else if (use === 'chatglm4') { const client = new ChatGLM4Client({ - refreshToken: Config.chatglmRefreshToken + refreshToken: Config.chatglmRefreshToken, + if_plus_model: Config.if_plus_model }) let resp = await client.sendMessage(prompt, conversation) if (resp.image) {