mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 13:27:08 +00:00
update: glm4新增plus模式开关
This commit is contained in:
parent
327802ed7b
commit
200d392819
3 changed files with 10 additions and 1 deletions
|
|
@ -12,6 +12,7 @@ export class ChatGLM4Client extends BaseClient {
|
||||||
this.supportFunction = false
|
this.supportFunction = false
|
||||||
this.debug = props.debug
|
this.debug = props.debug
|
||||||
this._refreshToken = props.refreshToken
|
this._refreshToken = props.refreshToken
|
||||||
|
this.if_plus_model = props.if_plus_model || false
|
||||||
}
|
}
|
||||||
|
|
||||||
async getAccessToken (refreshToken = this._refreshToken) {
|
async getAccessToken (refreshToken = this._refreshToken) {
|
||||||
|
|
@ -61,6 +62,7 @@ export class ChatGLM4Client extends BaseClient {
|
||||||
meta_data: {
|
meta_data: {
|
||||||
is_test: false,
|
is_test: false,
|
||||||
input_question_type: 'xxxx',
|
input_question_type: 'xxxx',
|
||||||
|
if_plus_model: this.if_plus_model,
|
||||||
channel: ''
|
channel: ''
|
||||||
},
|
},
|
||||||
messages: [
|
messages: [
|
||||||
|
|
|
||||||
|
|
@ -316,6 +316,12 @@ export function supportGuoba () {
|
||||||
bottomHelpMessage: 'chatglm_refresh_token 6个月有效期',
|
bottomHelpMessage: 'chatglm_refresh_token 6个月有效期',
|
||||||
component: 'Input'
|
component: 'Input'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'if_plus_model',
|
||||||
|
label: 'PLUS模式',
|
||||||
|
bottomHelpMessage: '更聪明,更全面',
|
||||||
|
component: 'Switch'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '以下为Claude API方式的配置',
|
label: '以下为Claude API方式的配置',
|
||||||
component: 'Divider'
|
component: 'Divider'
|
||||||
|
|
|
||||||
|
|
@ -595,7 +595,8 @@ class Core {
|
||||||
return await client.sendMessage(prompt, option)
|
return await client.sendMessage(prompt, option)
|
||||||
} else if (use === 'chatglm4') {
|
} else if (use === 'chatglm4') {
|
||||||
const client = new ChatGLM4Client({
|
const client = new ChatGLM4Client({
|
||||||
refreshToken: Config.chatglmRefreshToken
|
refreshToken: Config.chatglmRefreshToken,
|
||||||
|
if_plus_model: Config.if_plus_model
|
||||||
})
|
})
|
||||||
let resp = await client.sendMessage(prompt, conversation)
|
let resp = await client.sendMessage(prompt, conversation)
|
||||||
if (resp.image) {
|
if (resp.image) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue