From 4900f405022bdcec4815151b4c6bd28a8f97f507 Mon Sep 17 00:00:00 2001 From: Mio-FCIP <1099834705@qq.com> Date: Sat, 1 Mar 2025 18:56:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BA=AF=E5=9B=BE=E7=89=87=E8=A7=A6?= =?UTF-8?q?=E5=8F=91=E7=9A=84=E4=BC=AA=E4=BA=BA=E5=AF=B9=E8=AF=9D=20?= =?UTF-8?q?=E8=B7=B3=E8=BF=87=E6=9F=A5=E6=89=BE=E5=B7=A5=E5=85=B7=E5=85=B3?= =?UTF-8?q?=E9=94=AE=E8=AF=8D=20(#771)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1|Miao-Yunzai | [MiaoYz][18:33:56.656][ERRO] [ChatGPT-Plugin 伪人bym][bym] 1|Miao-Yunzai | [MiaoYz][18:33:56.661][ERRO] TypeError: Cannot read properties of undefined (reading 'includes') 1|Miao-Yunzai | at file:///www/fake_mio/bot/Miao-Yunzai/plugins/chatgpt-plugin/model/core.js:594:101 1|Miao-Yunzai | at Array.find () 1|Miao-Yunzai | at Core.sendMessage (file:///www/fake_mio/bot/Miao-Yunzai/plugins/chatgpt-plugin/model/core.js:594:84) 1|Miao-Yunzai | at process.processTicksAndRejections (node:internal/process/task_queues:105:5) 1|Miao-Yunzai | at async bym (file:///www/fake_mio/bot/Miao-Yunzai/plugins/chatgpt-plugin/apps/bym.js:63:17) 1|Miao-Yunzai | at async PluginsLoader.deal (file:///www/fake_mio/bot/Miao-Yunzai/lib/plugins/loader.js:275:41) --- model/core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/core.js b/model/core.js index 87a833c..a2ca604 100644 --- a/model/core.js +++ b/model/core.js @@ -591,7 +591,7 @@ class Core { await e.reply(msg, true) } }) - option.toolMode = (opt.settings.forceTool || Config.geminiForceToolKeywords?.find(k => prompt.includes(k))) ? 'ANY' : 'AUTO' + option.toolMode = (opt.settings.forceTool || Config.geminiForceToolKeywords?.find(k => prompt?.includes(k))) ? 'ANY' : 'AUTO' return await client.sendMessage(prompt, option) } else if (use === 'chatglm4') { const client = new ChatGLM4Client({