From 7bcba3daf894434eb9928114f53b2ec9b6c9e165 Mon Sep 17 00:00:00 2001 From: jaakko Date: Tue, 14 Apr 2026 21:43:44 +0300 Subject: [PATCH] =?UTF-8?q?CodeBench:=20--spec-model=20lippu=20=E2=80=94?= =?UTF-8?q?=20eri=20malli=20spec-vaiheille=20(1-2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kipina-codebench/benchmark.mjs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/kipina-codebench/benchmark.mjs b/kipina-codebench/benchmark.mjs index 297e072..5c9cd58 100644 --- a/kipina-codebench/benchmark.mjs +++ b/kipina-codebench/benchmark.mjs @@ -35,6 +35,7 @@ const RESULTS_DIR = join(__dirname, 'results'); const THINK_MODE = args.includes('--think'); const COMPACT_MODE = args.includes('--compact'); const NO_ORCHESTRATE = args.includes('--no-orchestrate'); +const SPEC_MODEL = arg('spec-model', ''); // Eri malli spec-vaiheille (1-2) const LANG = arg('lang', 'python'); // python | rust | go const ROUNDS = parseInt(arg('rounds', '1')); // 1-10 toistoa const MAX_FIX_ROUNDS = 2; @@ -328,8 +329,9 @@ async function runPipeline(model, scenario, round = 1) { try { // 1. Vaatimukset - console.log(` [1/5] Vaatimukset...`); - const req = await ollamaChat(model, scenario.prompt, CLIENT_SYSTEM, 2048); + const specModel = SPEC_MODEL || model; + console.log(` [1/5] Vaatimukset${SPEC_MODEL ? ` (${SPEC_MODEL})` : ''}...`); + const req = await ollamaChat(specModel, scenario.prompt, CLIENT_SYSTEM, 2048); timings.push(req); if (!req.text || req.text.length < 50) { result.error = 'Vaatimukset liian lyhyet'; return result; } result.reqOk = true; @@ -337,7 +339,7 @@ async function runPipeline(model, scenario, round = 1) { // 2. JSON-speksi console.log(` [2/5] JSON-speksi...`); - const specResp = await ollamaChat(model, `${req.text}\n\nOutput a JSON spec for this project.`, SPEC_SYSTEM, 4096); + const specResp = await ollamaChat(specModel, `${req.text}\n\nOutput a JSON spec for this project.`, SPEC_SYSTEM, 4096); timings.push(specResp); const spec = extractJson(specResp.text); if (!spec || !spec.entities || spec.entities.length === 0) { result.error = 'JSON-speksi epäonnistui'; writeFileSync(`${dir}/_spec_raw.txt`, specResp.text); return result; }