mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 13:27:08 +00:00
fix: 开启内容生成会爆token的问题
This commit is contained in:
parent
d88550db39
commit
758aeb67a2
4 changed files with 25 additions and 16 deletions
|
|
@ -276,6 +276,7 @@ export class ChatgptManagement extends plugin {
|
|||
}
|
||||
await this.reply(roleList)
|
||||
}
|
||||
|
||||
async ttsSwitch (e) {
|
||||
let userReplySetting = await redis.get(`CHATGPT:USER:${e.sender.user_id}`)
|
||||
userReplySetting = !userReplySetting
|
||||
|
|
|
|||
|
|
@ -377,6 +377,12 @@ export function supportGuoba () {
|
|||
bottomHelpMessage: '加强主人认知。希望机器人认清主人,避免NTR可开启。开启后可能会与自设定的内容有部分冲突。sydney模式可以放心开启',
|
||||
component: 'Switch'
|
||||
},
|
||||
{
|
||||
field: 'enableGenerateContents',
|
||||
label: '允许生成图像等内容',
|
||||
bottomHelpMessage: '开启后类似网页版能够发图。但是此选项会占用大量token,自设定等模式下容易爆token',
|
||||
component: 'Switch'
|
||||
},
|
||||
// {
|
||||
// field: 'cognitiveReinforcementTip',
|
||||
// label: '加强主人认知的后台prompt',
|
||||
|
|
|
|||
|
|
@ -347,25 +347,26 @@ export default class SydneyAIClient {
|
|||
logger.mark('sydney websocket constructed successful')
|
||||
}
|
||||
const toneOption = 'h3imaginative'
|
||||
let optionsSets = [
|
||||
'nlu_direct_response_filter',
|
||||
'deepleo',
|
||||
'disable_emoji_spoken_text',
|
||||
'responsible_ai_policy_235',
|
||||
'enablemm',
|
||||
toneOption,
|
||||
'dtappid',
|
||||
'cricinfo',
|
||||
'cricinfov2',
|
||||
'dv3sugg'
|
||||
]
|
||||
if (Config.enableGenerateContents) {
|
||||
optionsSets.push(...['clgalileo', 'gencontentv3', 'rai267'])
|
||||
}
|
||||
const obj = {
|
||||
arguments: [
|
||||
{
|
||||
source: 'cib',
|
||||
optionsSets: [
|
||||
'nlu_direct_response_filter',
|
||||
'deepleo',
|
||||
'disable_emoji_spoken_text',
|
||||
'responsible_ai_policy_235',
|
||||
'enablemm',
|
||||
toneOption,
|
||||
'clgalileo',
|
||||
'gencontentv3',
|
||||
'rai267',
|
||||
'dtappid',
|
||||
'cricinfo',
|
||||
'cricinfov2',
|
||||
'dv3sugg'
|
||||
],
|
||||
optionsSets,
|
||||
sliceIds: [
|
||||
'222dtappid',
|
||||
'225cricinfo',
|
||||
|
|
|
|||
|
|
@ -122,7 +122,8 @@ const defaultConfig = {
|
|||
azureTTSEmotion: false,
|
||||
enhanceAzureTTSEmotion: false,
|
||||
autoJapanese: false,
|
||||
version: 'v2.6.0'
|
||||
enableGenerateContents: false,
|
||||
version: 'v2.6.1'
|
||||
}
|
||||
const _path = process.cwd()
|
||||
let config = {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue