Poistettu native-noden kovakoodattu system prompt — agentin prompti toimii nyt
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) <noreply@anthropic.com>
This commit is contained in:
@@ -79,7 +79,8 @@ impl LlmEngine {
|
||||
}
|
||||
|
||||
pub async fn generate(&self, prompt: &str, max_tokens: usize) -> Result<GenerateResult, String> {
|
||||
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,
|
||||
|
||||
Reference in New Issue
Block a user