emergence-mini-dilles/web/index.html
Jeuners 23c914d743 Ollama URL with auto-fallback
The user wanted to use Ollama on a network host (192.168.1.245).
The host is reachable (ping ~900ms) but its Ollama port (11434)
is not open, so the engine falls back to a local URL.

Changes:
- .env: EMERGENCE_OLLAMA_URL = network host, EMERGENCE_OLLAMA_FALLBACK_URL
  = localhost
- engine/llm.py: chat_ollama now iterates primary then fallback URL
  on connection failure. is_available() does the same. provider_info()
  exposes both URLs.
- All 100 tests still pass.

Live-verified: lovely+spark (llama3.2:3b) use mode=llm with ~10s
latency, which is the connection-refused on 192.168.1.245 + the
successful fallback to 127.0.0.1. As soon as 192.168.1.245's Ollama
is reachable, latency will drop to normal (~1-3s).
2026-06-15 03:08:42 +02:00

73 lines
1.9 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Emergence-Mini · Live World</title>
<link rel="stylesheet" href="/static/style.css" />
</head>
<body>
<header>
<h1>Emergence-Mini</h1>
<div class="meta">
<span>Tick <b id="tick">0</b></span>
<span>Agents <b id="agentCount">0</b></span>
<span>Proposals <b id="propCount">0</b></span>
<span id="llmInfo" class="llm-info"></span>
<span class="ws-status" id="wsStatus">connecting…</span>
</div>
</header>
<main>
<section class="canvas-wrap">
<canvas id="world" width="640" height="640"></canvas>
<div class="legend">
<span class="dot anchor"></span>Anchor
<span class="dot flora"></span>Flora
<span class="dot lovely"></span>Lovely
<span class="dot spark"></span>Spark
</div>
</section>
<aside>
<h2>Time Dilation · Eigenzeit τ</h2>
<div id="clocks"></div>
<div id="drift"></div>
<h2>📝 Generated Texts <small id="textsCount">(0)</small></h2>
<div id="texts">
<small>Noch keine Texte. Agenten generieren welche über
write_blog, add_to_billboard, speak_to_all, say_to_agent,
add_to_longterm_memory.</small>
</div>
<h2>Live Feed</h2>
<ul id="feed"></ul>
<h2>Agents</h2>
<div id="agentList"></div>
<h2>Town Hall · Active Proposals</h2>
<div id="proposals"></div>
<h2>Constitution</h2>
<div id="constitution"></div>
<h2>Manual Control</h2>
<form id="manual">
<label>Agent
<select name="agent"></select>
</label>
<label>Tool
<select name="tool"></select>
</label>
<label>Args (JSON)
<input name="args" value="{}" />
</label>
<button type="submit">Run</button>
</form>
</aside>
</main>
<script src="/static/app.js"></script>
</body>
</html>