Spaces:
Running
Running
Commit History
-
Personas + war-diary via llama.cpp (reusing woid's persona SSE protocol)
- llm.py: configurable runtime behind one stream_chat() — in-Space llama-cpp-python (local GGUF or HF pull) by default, OR an external OpenAI-compatible llama.cpp endpoint (TINY_LLM_BASE_URL, woid's switch). Lock-serialized; stub fallback. - prompts.py: Tiny-Army persona + war-diary system prompts. - persona_parse.py: woid's parse.js ported to Python (defensive JSON extraction). - app.py: Barracks diary() now streams from the model (Gradio generator); new POST /persona/generate/stream emitting woid-compatible SSE; Personas tab. - web/personaStream.js: vendored from woid (now takes an optional path param, upstream-safe); web/personaPanel.js: vanilla panel reusing it verbatim; web/shell/persona.css. nav.json gains a Personas item. - Dockerfile/requirements: llama-cpp-python prebuilt CPU wheel + huggingface_hub. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>67f4321