• exec/chat_llm.js

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Friday, October 02, 2026 15:10:06
    https://gitlab.synchro.net/main/sbbs/-/commit/b503bdb9cbe54284353a706b
    Modified Files:
    exec/chat_llm.js
    Log Message:
    chat_llm: let the guru tell people which model it runs on

    Asked "what LLM are you using?" on IRC, the guru deflected ("whatever
    LLM is configured in chat_llm.ini") because nothing in its prompt named
    the model, and the question pulled the generic howto:llm-guru wiki text
    into retrieval, which it then parroted.

    Add an @llm_model@ persona macro, expanded from the configured model=,
    so a persona can state the real model and it tracks config changes.
    Classify "which model/LLM/AI are you" style questions as conversational
    so they skip retrieval like the other about-the-bot questions.

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Friday, October 02, 2026 15:10:06
    https://gitlab.synchro.net/main/sbbs/-/commit/f79e31c6dc4b3dc94adb171d
    Modified Files:
    exec/chat_llm.js
    Log Message:
    chat_llm: convert em-dashes and curly quotes in replies to ASCII

    The persona forbids em-dashes, but qwen3.5:9b emits them anyway, along
    with curly quotes and en-dashes, which mojibake on CP437 terminals and
    in IRC relays. sanitize_reply() now maps em-dash to " -- ", a spaced
    en-dash to " -- " and a bare one to "-", curly quotes to straight ones,
    and an ellipsis to "...".

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Friday, October 16, 2026 21:19:03
    https://gitlab.synchro.net/main/sbbs/-/commit/2a48d15a6f3e497f8af7b03a
    Modified Files:
    exec/chat_llm.js
    Log Message:
    chat_llm: reject a provider/endpoint mismatch at config load

    Ollama serves both its native /api/chat and an OpenAI-compatible /v1/chat/completions on the same port, so pairing the wrong provider with
    an endpoint doesn't fail at the HTTP level. provider=openai against
    /api/chat failed only after the full generation, with "no choices in
    response: <raw JSON>"; a sysop (Keyop) hit exactly that in #synchronet
    while following the advice to switch endpoints.

    load_config() now compares the endpoint's path with the provider
    (/api/chat = ollama, .../chat/completions = openai) for both endpoint and endpoint_fallback, and throws an error naming the fix, before any
    request. For URLs whose path doesn't say (e.g. behind a proxy), the
    response parsers also recognize the other API's reply shape and say so
    instead of dumping the raw JSON.

    Tested against Ollama: both mismatches fail at once (0.0s) with the new messages; both correct pairings still reply; the live config still
    loads; chat_openai() aimed at /api/chat reports the native shape.

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Friday, October 16, 2026 21:19:03
    https://gitlab.synchro.net/main/sbbs/-/commit/87062103db874c07c2048efb
    Modified Files:
    exec/chat_llm.js
    Log Message:
    chat_llm: honor "= false" for boolean chat_llm.ini keys

    iniGetObject() already converts true/false values to booleans, but load_config() and its callers compared these keys against the STRING
    'false', which never matched. So setting any of memory_persist,
    reply_dedup, memory_summary_in_prompt, stream or simulate_typos to false
    was silently ignored. memory_persist = false, the documented setting for
    bots in public channels that shouldn't retain anything about strangers,
    still wrote per-speaker memory files.

    New cfg_bool() normalizes all five in load_config() (booleans, numbers,
    and false/no/off/0 strings; unset keeps the default of true), and the
    use sites test the booleans.

    Tested: an ini with the five keys off yields false for each, unset
    yields true, and a chat turn with memory_persist = false leaves the
    speaker's memory file untouched.

    Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net