mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 05:17:10 +00:00
fix: 增加强制工具关键词 看你还不听话
This commit is contained in:
parent
b486b45f44
commit
d29bfb0bc2
3 changed files with 23 additions and 1 deletions
|
|
@ -557,6 +557,25 @@ export function supportGuoba () {
|
|||
bottomHelpMessage: '对https://generativelanguage.googleapis.com的反代',
|
||||
component: 'Input'
|
||||
},
|
||||
{
|
||||
field: 'geminiForceToolKeywords',
|
||||
label: 'gemini强制工具关键词,包含这里关键词的问题一定会调用工具。',
|
||||
component: 'GTags',
|
||||
componentProps: {
|
||||
placeholder: '请输入强制工具关键词',
|
||||
allowAdd: true,
|
||||
allowDel: true,
|
||||
showPrompt: true,
|
||||
promptProps: {
|
||||
content: '添加新的强制工具关键词',
|
||||
okText: '添加',
|
||||
rules: [
|
||||
{ required: true, message: '强制工具关键词不能为空' }
|
||||
]
|
||||
},
|
||||
valueParser: (value) => value.split(',') || []
|
||||
}
|
||||
},
|
||||
{
|
||||
label: '以下为一些杂项配置。',
|
||||
component: 'Divider'
|
||||
|
|
|
|||
|
|
@ -127,7 +127,8 @@ class Core {
|
|||
},
|
||||
settings: {
|
||||
replyPureTextCallback: undefined,
|
||||
enableGroupContext: Config.enableGroupContext
|
||||
enableGroupContext: Config.enableGroupContext,
|
||||
forceTool: false
|
||||
}
|
||||
}) {
|
||||
if (!conversation) {
|
||||
|
|
@ -567,6 +568,7 @@ class Core {
|
|||
await e.reply(msg, true)
|
||||
}
|
||||
})
|
||||
option.toolMode = opt.settings.forceTool ? 'ANY' : 'AUTO'
|
||||
return await client.sendMessage(prompt, option)
|
||||
} else if (use === 'chatglm4') {
|
||||
const client = new ChatGLM4Client({
|
||||
|
|
|
|||
|
|
@ -228,6 +228,7 @@ const defaultConfig = {
|
|||
bingReasoning: false, // 是否深度思考
|
||||
apiMaxToken: 4096,
|
||||
enableToolPrivateSend: true, // 是否允许智能模式下私聊骚扰其他群友。主人不受影响。
|
||||
geminiForceToolKeywords: [],
|
||||
version: 'v2.8.4'
|
||||
}
|
||||
const _path = process.cwd()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue