BBS: TELESC.NET.BR Assunto: ctrl/chat_llm.ini exec/chat_llm.js De: Rob Swindell (on Debian Linux) Data: Fri, 29 May 2026 23:59:56 -0700 ----------------------------------------------------------- https://gitlab.synchro.net/main/sbbs/-/commit/3ef83bcbfc9ed41607b63774 Modified Files: ctrl/chat_llm.ini exec/chat_llm.js Log Message: chat_llm: add configurable num_ctx (Ollama context window) Adds a num_ctx knob (read from chat_llm.ini, per-persona or [default]) passed through to Ollama's request options on all three /api/chat builds (initial, pre-tool, follow-up). 0/unset => omitted via `cfg.num_ctx || undefined` (JSON.stringify drops an undefined value), so Ollama keeps its server default and existing installs are unaffected. Why: a large system prompt plus retrieved RAG context can exceed Ollama's ~4096-token default; llama.cpp then keeps the prompt's tail and truncates the FRONT, dropping the identity/style rules at the top of the system prompt and making the bot answer as a generic "AI assistant". Observed with a 4698-token persona prompt capped at 4096. Documents the knob (commented, off by default) in the stock chat_llm.ini. Co-Authored-By: Claude Opus 4.8n --- mSynchronetn hgVertrauen n hHome of Synchronet n gh[vert/cvs/bbs].synchro.net ----------------------------------------------------------- [Voltar]