update: glm4新增plus模式开关

This commit is contained in:
带套的老王 2025-03-27 21:55:14 +08:00
parent 327802ed7b
commit 200d392819
3 changed files with 10 additions and 1 deletions

View file

@ -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: [

View file

@ -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'

View file

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