From 34a56e408d640434f6ec182423c6997e64253d5d Mon Sep 17 00:00:00 2001 From: jaakko Date: Tue, 14 Apr 2026 06:58:18 +0300 Subject: [PATCH] =?UTF-8?q?Benchmark:=20stripThinking=20tukee=20my=C3=B6s?= =?UTF-8?q?=20qwen3/3.5=20-tageja?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- network-poc/tests/model-benchmark.mjs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/network-poc/tests/model-benchmark.mjs b/network-poc/tests/model-benchmark.mjs index c6f6e7b..1b11575 100644 --- a/network-poc/tests/model-benchmark.mjs +++ b/network-poc/tests/model-benchmark.mjs @@ -26,9 +26,12 @@ const SCENARIO_FILTER = arg('scenarios', 'default'); const OUTPUT_DIR = arg('output', '/tmp/kipina-benchmark'); const MAX_FIX_ROUNDS = 2; -// === Ajattelutagien siivous (gemma4 ym.) === +// === Ajattelutagien siivous (gemma4, qwen3/3.5 ym.) === function stripThinking(text) { - return text.replace(/<\|channel>thought[\s\S]*?/g, '').trim(); + return text + .replace(/<\|channel>thought[\s\S]*?/g, '') // gemma4 + .replace(/[\s\S]*?<\/think>/g, '') // qwen3, qwen3.5 + .trim(); } // === Ollama / Hub -client ===