From f05da98d3798e2a00a87b6e96d60ab00d9321b0b Mon Sep 17 00:00:00 2001 From: ikechan8370 Date: Mon, 3 Feb 2025 18:36:47 +0800 Subject: [PATCH] feat: add switch for thinking content forward --- apps/chat.js | 9 +++++++-- guoba.support.js | 6 ++++++ utils/config.js | 4 +++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/apps/chat.js b/apps/chat.js index 47400b2..0f21bf0 100644 --- a/apps/chat.js +++ b/apps/chat.js @@ -1044,9 +1044,14 @@ export class chatgpt extends plugin { } }) if (thinking) { - let thinkingForward = await common.makeForwardMsg(e, [thinking], '思考过程') - this.reply(thinkingForward) + if (Config.forwardReasoning) { + let thinkingForward = await common.makeForwardMsg(e, [thinking], '思考过程') + this.reply(thinkingForward) + } else { + logger.mark('思考过程', thinking) + } } + if (Config.enableSuggestedResponses && chatMessage.suggestedResponses) { this.reply(`建议的回复:\n${chatMessage.suggestedResponses}`) } diff --git a/guoba.support.js b/guoba.support.js index 221271f..406fc9f 100644 --- a/guoba.support.js +++ b/guoba.support.js @@ -151,6 +151,12 @@ export function supportGuoba () { bottomHelpMessage: '仅建议gpt-4-32k和gpt-3.5-turbo-16k-0613开启,gpt-4-0613也可。开启后机器人可以群管、收发图片、发视频发音乐、联网搜索等。注意较费token。配合开启读取群聊上下文效果更佳', component: 'Switch' }, + { + field: 'forwardReasoning', + label: '是否转发思考过程', + bottomHelpMessage: 'OpenAI的o系列、deepseek的r系列等思考模型的思考过程是否以转发形式发出。默认开启', + component: 'Switch' + }, { field: 'openAiBaseUrl', label: 'OpenAI API服务器地址', diff --git a/utils/config.js b/utils/config.js index bb9f606..771600e 100644 --- a/utils/config.js +++ b/utils/config.js @@ -215,9 +215,11 @@ const defaultConfig = { // 伪人额外设定 bymPreset: '', bymMode: 'gemini', + // 思考过程转发 + forwardReasoning: true, geminiEnableGoogleSearch: false, geminiEnableCodeExecution: false, - version: 'v2.8.2' + version: 'v2.8.3' } const _path = process.cwd() let config = {}