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) {