From 12ca87415c7a209d64df86a17ccfdfb36cc97292 Mon Sep 17 00:00:00 2001 From: Jaakko Vanhala Date: Fri, 10 Apr 2026 06:54:18 +0300 Subject: [PATCH] =?UTF-8?q?Poistettu=20native-noden=20kovakoodattu=20syste?= =?UTF-8?q?m=20prompt=20=E2=80=94=20agentin=20prompti=20toimii=20nyt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ollaman system-kenttä yliajoi agentin konfiguroiman promptin. Nyt system-kenttää ei lähetetä ollenkaan — agentin prompti tulee osana prompt-kenttää (kpnRun koostaa sen frontendissä). Tämä mahdollistaa per-agentti promptien toimimisen myös natiivilaskennalla. Co-Authored-By: Claude Opus 4.6 (1M context) --- network-poc/native-node/src/inference.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/network-poc/native-node/src/inference.rs b/network-poc/native-node/src/inference.rs index 64420d2..0ce6810 100644 --- a/network-poc/native-node/src/inference.rs +++ b/network-poc/native-node/src/inference.rs @@ -79,7 +79,8 @@ impl LlmEngine { } pub async fn generate(&self, prompt: &str, max_tokens: usize) -> Result { - let system = "You are a coding assistant. Respond with ONLY code. No explanations, no markdown fences, no 'Please note' or 'Here is' text. Only working code with proper imports."; + // System prompt tulee agentin konfiguraatiosta (frontend lähettää sen osana promptia). + // Tässä ei yliajeta sitä — Ollama saa vain prompt-kentän. let model = self.model.borrow().clone(); let start = Instant::now(); @@ -87,7 +88,6 @@ impl LlmEngine { .json(&serde_json::json!({ "model": model, "prompt": prompt, - "system": system, "stream": false, "options": { "num_predict": max_tokens,