mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-16 13:27:08 +00:00
Merge branch 'v2' into v2
This commit is contained in:
commit
775483c989
5 changed files with 40 additions and 9 deletions
|
|
@ -71,13 +71,13 @@ export class bym extends plugin {
|
|||
if (!Config.enableBYM) {
|
||||
return false
|
||||
}
|
||||
|
||||
const sender = e.sender.user_id
|
||||
const atBot = e.atme
|
||||
const card = e.sender.card || e.sender.nickname
|
||||
const group = e.group_id
|
||||
let ALLRole = 'default'
|
||||
|
||||
|
||||
let prop = Math.floor(Math.random() * 100)
|
||||
if (Config.assistantLabel && e.msg?.includes(Config.assistantLabel)) {
|
||||
prop = -1
|
||||
|
|
@ -291,7 +291,7 @@ export class bym extends plugin {
|
|||
}
|
||||
|
||||
let rsp = await core.sendMessage(e.msg, {}, Config.bymMode, e, {
|
||||
enableSmart: true,
|
||||
enableSmart: Config.smartMode,
|
||||
system: {
|
||||
api: system,
|
||||
qwen: system,
|
||||
|
|
|
|||
|
|
@ -1810,12 +1810,24 @@ azure语音:Azure 语音是微软 Azure 平台提供的一项语音服务,
|
|||
let config = []
|
||||
config.push(`当前模式:${use}`)
|
||||
config.push(`\n当前API模型:${Config.model}`)
|
||||
config.push(`\n当前开启API流式输出:${Config.apiStream}`)
|
||||
config.push(`\n当前开启BYM模式:${Config.enableBYM}`)
|
||||
config.push(`\n当前BYM模式:${Config.bymMode}`)
|
||||
config.push(`\n当前智能模式:${Config.smartMode}`)
|
||||
if (e.isPrivate) {
|
||||
config.push(`\n当前APIKey:${Config.apiKey}`)
|
||||
config.push(`\n当前API反代:${Config.openAiBaseUrl}`)
|
||||
config.push(`\n当前必应反代:${Config.sydneyReverseProxy}`)
|
||||
config.push(`\n当前Gemini API Key:${Config.geminiKey}`)
|
||||
config.push(`\n当前Gemini反代:${Config.geminiBaseUrl}`)
|
||||
config.push(`\n当前Claude API 反代:${Config.claudeApiBaseUrl}`)
|
||||
config.push(`\n当前Claude API Key:${Config.claudeApiKey}`)
|
||||
config.push(`\n当前开启工具箱:${Config.enableToolbox}`)
|
||||
}
|
||||
config.push(`\n当前星火模型:${Config.xhmode}`)
|
||||
config.push(`\n当前Claude模型:${Config.claudeApiModel}`)
|
||||
config.push(`\n当前Gemini模型:${Config.geminiModel}`)
|
||||
config.push(`\n当前Qwen模型:${Config.qwenModel}`)
|
||||
this.reply(config)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ export function supportGuoba () {
|
|||
{
|
||||
field: 'enableBYM',
|
||||
label: '开启伪人模式',
|
||||
bottomHelpMessage: '开启后,将在群内随机发言,伪装成人。取消机器人前缀体验最佳。目前仅支持gemini,会使用gemini的配置。发言包括AI名字会必定触发回复。暂不支持分群管理,可在不同群禁用或启动“ChatGPT-Plugin 伪人bym”功能',
|
||||
bottomHelpMessage: '开启后,将在群内随机发言,伪装成人。取消机器人前缀体验最佳。目前仅支持gemini,会使用gemini的配置。发言包括AI名字会必定触发回复。',
|
||||
component: 'Switch'
|
||||
},
|
||||
{
|
||||
|
|
@ -142,9 +142,15 @@ export function supportGuoba () {
|
|||
{
|
||||
field: 'model',
|
||||
label: 'OpenAI 模型',
|
||||
bottomHelpMessage: 'gpt-4, gpt-4-0613, gpt-4-1106, gpt-4-32k, gpt-4-32k-0613, gpt-3.5-turbo, gpt-3.5-turbo-0613, gpt-3.5-turbo-1106, gpt-3.5-turbo-16k-0613。默认为gpt-3.5-turbo,gpt-4需账户支持',
|
||||
bottomHelpMessage: '填写OpenAI模型或OpenAI API兼容的其他模型。',
|
||||
component: 'Input'
|
||||
},
|
||||
{
|
||||
field: 'apiMaxToken',
|
||||
label: 'max token',
|
||||
bottomHelpMessage: '默认4096',
|
||||
component: 'InputNumber'
|
||||
},
|
||||
{
|
||||
field: 'smartMode',
|
||||
label: '智能模式',
|
||||
|
|
@ -154,13 +160,13 @@ export function supportGuoba () {
|
|||
{
|
||||
field: 'forwardReasoning',
|
||||
label: '是否转发思考过程',
|
||||
bottomHelpMessage: 'OpenAI的o系列、deepseek的r系列等思考模型的思考过程是否以转发形式发出。默认开启',
|
||||
bottomHelpMessage: 'OpenAI的o系列、deepseek的r系列等思考模型的思考过程是否以转发形式发出。仅适配reasoning_content。默认开启。',
|
||||
component: 'Switch'
|
||||
},
|
||||
{
|
||||
field: 'openAiBaseUrl',
|
||||
label: 'OpenAI API服务器地址',
|
||||
bottomHelpMessage: 'OpenAI的API服务器地址。注意要带上/v1。默认为https://api.openai.com/v1',
|
||||
bottomHelpMessage: 'OpenAI兼容API服务器地址。注意要带上/v1。默认为https://api.openai.com/v1',
|
||||
component: 'Input'
|
||||
},
|
||||
{
|
||||
|
|
@ -918,7 +924,6 @@ export function supportGuoba () {
|
|||
label: '合成emoji的API地址,默认谷歌厨房',
|
||||
component: 'Input'
|
||||
},
|
||||
|
||||
{
|
||||
field: 'bymRate',
|
||||
label: '伪人模式触发默认概率,单位为%',
|
||||
|
|
@ -928,6 +933,18 @@ export function supportGuoba () {
|
|||
max: 100
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'bymDisableGroup',
|
||||
label: '伪人禁用群',
|
||||
bottomHelpMessage: '设置在该群禁用伪人模式',
|
||||
component: "GTags",
|
||||
componentProps: {
|
||||
placeholder: '请输入群号',
|
||||
allowAdd: true,
|
||||
allowDel: true,
|
||||
valueParser: ((value) => value.split(',') || []),
|
||||
},
|
||||
},
|
||||
{
|
||||
field: 'bymMode',
|
||||
label: '伪人模型',
|
||||
|
|
|
|||
|
|
@ -646,7 +646,8 @@ class Core {
|
|||
completionParams,
|
||||
assistantLabel: Config.assistantLabel,
|
||||
fetch: newFetch,
|
||||
maxModelTokens
|
||||
maxModelTokens,
|
||||
maxResponseTokens: Config.apiMaxToken
|
||||
}
|
||||
let openAIAccessible = (Config.proxy || !(await isCN())) // 配了代理或者服务器在国外,默认认为不需要反代
|
||||
if (opts.apiBaseUrl !== defaultOpenAIAPI && openAIAccessible && !Config.openAiForceUseReverse) {
|
||||
|
|
|
|||
|
|
@ -199,6 +199,7 @@ const defaultConfig = {
|
|||
enableBYM: false,
|
||||
// 触发对话的概率,百分比。比如5%就写5
|
||||
bymRate: 5,
|
||||
bymDisableGroup: [],
|
||||
// 伪人模式触发骂人反击的关键词
|
||||
bymFuckList: [
|
||||
'骂',
|
||||
|
|
@ -225,7 +226,7 @@ const defaultConfig = {
|
|||
bingAiOid: '',
|
||||
_2captchaKey: '',
|
||||
bingReasoning: false, // 是否深度思考
|
||||
|
||||
apiMaxToken: 4096,
|
||||
version: 'v2.8.3'
|
||||
}
|
||||
const _path = process.cwd()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue