feat: rebuild news summarizer on local Ollama

Swap Nous Portal for the newsPipeline local_llm generate path
(POST /api/generate, GET /api/tags). No API key. Settings model
selector lists Ollama tags; idle if the host is down.
This commit is contained in:
Sirius DevOps 2026-08-28 19:38:14 -04:00
commit 58ff43bdee
15 changed files with 336 additions and 339 deletions

View file

@ -840,7 +840,7 @@
<div class="ns-kicker">Executive Summary <span class="ns-badge" id="ns-badge">WAITING</span></div>
<div class="ns-time" id="ns-time">—</div>
<div class="ns-body" id="ns-body">
<div class="ns-empty">No executive summary yet — the Nous summarizer is idle until <code>NOUS_API_KEY</code> is set on the Pi and a model is chosen in Settings.</div>
<div class="ns-empty">No executive summary yet — the Ollama summarizer is idle until a model is chosen in Settings and <code>LLM_URL</code> is reachable.</div>
</div>
</div>
@ -968,7 +968,7 @@
<section class="view" id="view-keys" aria-label="API keys">
<div class="subview">
<h2><span class="tick">⚿</span> API Keys</h2>
<p class="sub">Keys used by ingest services (FIRMS, Nous Portal, Telegram, AIS, …). Stored in Postgres, never shown again — only status + last 4 chars.</p>
<p class="sub">Keys used by ingest services (FIRMS, Telegram, AIS, …). Stored in Postgres, never shown again — only status + last 4 chars.</p>
<div class="key-grid" id="keys-grid"></div>
</div>
</section>
@ -997,11 +997,11 @@
<p class="set-note" style="margin-bottom:0.9rem">Takes effect on the next hourly run (:05). No container restart.</p>
<div class="set-row">
<label>Provider</label>
<span>Nous Portal (inference-api.nousresearch.com)</span>
<span>Local Ollama (LLM_URL)</span>
</div>
<div class="set-row">
<label>API key</label>
<span>set in API Keys as NOUS_API_KEY (never shown here)</span>
<span>none — Ollama on the GPU host</span>
</div>
<div class="set-row">
<label for="set-summary-model">Model</label>
@ -1370,7 +1370,7 @@ function renderNewsSummary(summaries) {
const badgeEl = document.getElementById('ns-badge');
if (!bodyEl) return;
if (!summaries || !summaries.length) {
bodyEl.innerHTML = '<div class="ns-empty">No executive summary yet — the Nous summarizer is idle until <code>NOUS_API_KEY</code> is set on the Pi and a model is chosen in Settings.</div>';
bodyEl.innerHTML = '<div class="ns-empty">No executive summary yet — the Ollama summarizer is idle until a model is chosen in Settings and <code>LLM_URL</code> is reachable.</div>';
timeEl.textContent = '—';
badgeEl.textContent = 'WAITING';
return;
@ -1547,7 +1547,6 @@ function sentimentBadge(label) {
/* ═══════════════ API KEYS ═══════════════ */
const KEY_PATTERNS = {
'FIRMS_MAP_KEY': /^[0-9a-fA-F]{32}$/,
'NOUS_API_KEY': /^.{16,}$/,
'TELEGRAM_TOKEN': /^\d{8,10}:[0-9A-Za-z_-]{35}$/,
};
async function loadKeys() {