Compare commits
1 Commits
fix/1341
...
bug/1415-p
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
465599accb |
6
app.js
6
app.js
@@ -15,6 +15,10 @@ import { ReasoningTrace } from './nexus/components/reasoning-trace.js';
|
||||
// NEXUS v1.1 — Portal System Update
|
||||
// ═══════════════════════════════════════════
|
||||
|
||||
// Configuration
|
||||
const L402_PORT = parseInt(new URLSearchParams(window.location.search).get('l402_port') || '8080');
|
||||
const L402_URL = `http://localhost:${L402_PORT}/api/cost-estimate`;
|
||||
|
||||
const NEXUS = {
|
||||
colors: {
|
||||
primary: 0x4af0c0,
|
||||
@@ -681,7 +685,7 @@ function updateGOFAI(delta, elapsed) {
|
||||
|
||||
// Simulate calibration update
|
||||
calibrator.update({ input_tokens: 100, complexity_score: 0.5 }, 0.06);
|
||||
if (Math.random() > 0.95) l402Client.fetchWithL402("http://localhost:8080/api/cost-estimate");
|
||||
if (Math.random() > 0.95) l402Client.fetchWithL402(L402_URL);
|
||||
}
|
||||
|
||||
metaLayer.track(startTime);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
from http.server import HTTPServer, BaseHTTPRequestHandler
|
||||
import json
|
||||
import secrets
|
||||
import os
|
||||
|
||||
class L402Handler(BaseHTTPRequestHandler):
|
||||
def do_GET(self):
|
||||
@@ -25,7 +26,9 @@ class L402Handler(BaseHTTPRequestHandler):
|
||||
self.send_response(404)
|
||||
self.end_headers()
|
||||
|
||||
def run(server_class=HTTPServer, handler_class=L402Handler, port=8080):
|
||||
def run(server_class=HTTPServer, handler_class=L402Handler, port=None):
|
||||
if port is None:
|
||||
port = int(os.environ.get('L402_PORT', 8080))
|
||||
server_address = ('', port)
|
||||
httpd = server_class(server_address, handler_class)
|
||||
print(f"Starting L402 Skeleton Server on port {port}...")
|
||||
|
||||
@@ -27,7 +27,7 @@ Usage:
|
||||
python mempalace/fleet_api.py
|
||||
|
||||
# Custom host/port/palace:
|
||||
FLEET_PALACE_PATH=/data/fleet python mempalace/fleet_api.py --host 0.0.0.0 --port 8080
|
||||
FLEET_PALACE_PATH=/data/fleet python mempalace/fleet_api.py --host 0.0.0.0 --port 7772
|
||||
|
||||
Refs: #1078, #1075, #1085
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user