Ferrell Synthetic Intelligence commited on
Commit ·
d109328
1
Parent(s): 5232c15
Make Model Arena dynamically benchmark packs
Browse files
app.js
CHANGED
|
@@ -348,10 +348,14 @@ async function saveReplay(status = 'verified') {
|
|
| 348 |
}
|
| 349 |
|
| 350 |
async function compareModels() {
|
| 351 |
-
|
| 352 |
-
|
| 353 |
-
|
| 354 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 355 |
}
|
| 356 |
|
| 357 |
async function digestFile(file) {
|
|
|
|
| 348 |
}
|
| 349 |
|
| 350 |
async function compareModels() {
|
| 351 |
+
$('#arena-status').textContent = 'Running models sequentially...';
|
| 352 |
+
try {
|
| 353 |
+
const response = await fetch('http://127.0.0.1:4777/api/arena/run', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ approved: true }) });
|
| 354 |
+
const result = await response.json();
|
| 355 |
+
if (!response.ok) throw new Error(result.error || 'arena failed');
|
| 356 |
+
$('#arena-status').textContent = result.winner ? `Winner: ${result.winner.model} (${(result.winner.score * 100).toFixed(1)}%, avg ${result.winner.latency_ms}ms)` : 'No model completed.';
|
| 357 |
+
appendLog('MODEL ARENA', 'Live sequential comparison complete. Scores are benchmark-local only.');
|
| 358 |
+
} catch (error) { $('#arena-status').textContent = `Arena blocked: ${error.message}`; appendLog('MODEL ARENA', error.message, 'warning'); }
|
| 359 |
}
|
| 360 |
|
| 361 |
async function digestFile(file) {
|