diff --git a/network-poc/static/index.html b/network-poc/static/index.html
index bd781dd..e57cecc 100644
--- a/network-poc/static/index.html
+++ b/network-poc/static/index.html
@@ -1849,18 +1849,34 @@
}
if (sub === 'load') {
- const size = parts[2]; // "3b" tai tyhjä (oletus 0.5B)
+ const arg = parts[2];
const btn = document.getElementById('agent-compute-btn');
- if (size === '3b') {
- coderSize = '3b';
- termLog(' Alustetaan 3B-laskentasolmua (~6.2 GB)...', '#d29922');
- } else if (btn && btn.dataset.state === 'ready') {
- termLog(' ✓ Kielimalli on jo ladattu ja valmis', '#3fb950');
- termLog(' Vinkki: kpn load 3b — lataa isompi 3B-malli', '#8b949e');
+ // Mallikatalogista valinta numerolla tai nimellä
+ const loadModels = [
+ { id: '1', key: '05b', name: 'Qwen2.5-Coder:0.5B', size: '~990 MB', coderSize: '05b' },
+ { id: '2', key: '3b', name: 'Qwen2.5-Coder:3B', size: '~6.2 GB', coderSize: '3b' },
+ ];
+ if (!arg) {
+ // Näytetään lista
+ termLog(' Ladattavat mallit:', '#c9d1d9');
+ for (const m of loadModels) {
+ const active = (btn?.dataset.state === 'ready' && coderSize === m.coderSize) ? ' ✓ ladattu' : '';
+ termLog(` ${m.id} ${m.name} (${m.size})${active}`);
+ }
+ termLog(' Käyttö: kpn load <numero>', '#8b949e');
return;
- } else {
- termLog(' Alustetaan laskentasolmua...', '#d29922');
}
+ const selected = loadModels.find(m => m.id === arg || m.key === arg || m.coderSize === arg);
+ if (!selected) {
+ termLog(` Tuntematon malli "${esc(arg)}". Kokeile: kpn load`, '#f85149');
+ return;
+ }
+ if (btn?.dataset.state === 'ready' && coderSize === selected.coderSize) {
+ termLog(` ✓ ${selected.name} on jo ladattu ja valmis`, '#3fb950');
+ return;
+ }
+ coderSize = selected.coderSize;
+ termLog(` Alustetaan ${selected.name} (${selected.size})...`, '#d29922');
if (btn) btn.click();
else ensureCoderNode();
return;
@@ -1874,11 +1890,14 @@
}
if (sub === 'models') {
- termLog(' smollm-135m — SmolLM 135M (kevyt)', '#a5d6ff');
- termLog(' qwen-05b — Qwen2.5 0.5B', '#a5d6ff');
- termLog(' phi3-mini — Phi-3 Mini', '#a5d6ff');
- termLog(' qwen-coder — Qwen2.5-Coder 0.5B', '#a5d6ff');
- termLog(' qwen-coder-3b — Qwen2.5-Coder 3B', '#a5d6ff');
+ termLog(' Käytettävissä olevat mallit:', '#c9d1d9');
+ termLog(' 1 qwen-coder Qwen2.5-Coder:0.5B ~990 MB | koodin generointi');
+ termLog(' 2 qwen-coder-3b Qwen2.5-Coder:3B ~6.2 GB | parempi koodinlaatu');
+ termLog(' 3 smollm-135m SmolLM 135M ~270 MB | kevyt, nopea');
+ termLog(' 4 qwen-05b Qwen2.5:0.5B ~990 MB | yleismalli');
+ termLog(' 5 phi3-mini Phi-3 Mini ~2.2 GB | Microsoftin malli');
+ termLog(' Käyttö: kpn run <malli> "<prompti>"', '#8b949e');
+ termLog(' Lataus: kpn load <numero>', '#8b949e');
return;
}
@@ -1928,7 +1947,7 @@
const kpnCommands = {
'kpn': ['help', 'run', 'pipeline', 'load', 'status', 'models', 'hello', 'clear'],
'kpn run': ['coder', 'coder-3b', 'manager', 'tester', 'qa', 'data', 'observer', 'qwen-coder', 'qwen-coder-3b', 'smollm-135m', 'qwen-05b', 'phi3-mini'],
- 'kpn load': ['3b'],
+ 'kpn load': ['1', '2'],
'kpn pipeline': ['"'],
};
// Esimerkkipromptit malleittain