8ball: fix substring pronoun bug, switch to 3B model
Lint / Shell (shellcheck) (push) Successful in 9s
Lint / JS (eslint) (push) Successful in 7s
Lint / Python (ruff) (push) Successful in 5s
Lint / Python deps (pip-audit) (push) Successful in 1m27s
Lint / Secret scan (gitleaks) (push) Successful in 7s

- Fix about_jared/about_wynter using substring match — "they" matched
  "he", "theme" matched "he", etc., routing Wynter's questions to the
  wrong branch. Now uses \b word boundaries via re.search.
- Switch BALL_MODEL default from sadiq-bd 1B uncensored to
  llama3.2:latest (3B) — the 1B model hallucinates, ignores persona
  instructions, and mentions Jared randomly. GPU is now working on
  Arc A380 at ~25 tok/s so the larger model is practical.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-21 00:21:42 -04:00
parent f7ca1b00db
commit 21a64174e6
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -27,7 +27,7 @@ _MODEL_DISPLAY = {
"lotusllm": "Llama 3.2 1B",
"lotusllm:latest": "Llama 3.2 1B",
"lotusllmben:latest": "Llama 2 7B",
"sadiq-bd/llama3.2-1b-uncensored:latest": "Llama 3.2 1B",
"sadiq-bd/llama3.2-1b-uncensored:latest": "Llama 3.2 1B (uncensored)",
"llama3.2:latest": "Llama 3.2 3B",
"llama3.2:1b": "Llama 3.2 1B",
"llama3.3:latest": "Llama 3.3 70B",
@@ -222,8 +222,8 @@ async def cmd_8ball(client: AsyncClient, room_id: str, sender: str, args: str):
if sender in (JARED_ID, WYNTER_ID):
question = sanitize_input(args)
q_lower = question.lower()
about_wynter = any(w in q_lower for w in ("wynter", "she", "her", "herself"))
about_jared = any(w in q_lower for w in ("jared", "he", "him", "himself"))
about_wynter = bool(re.search(r'\b(wynter|she|her|herself)\b', q_lower))
about_jared = bool(re.search(r'\b(jared|he|him|himself)\b', q_lower))
is_jared_branch = (sender == JARED_ID and not about_wynter)
if sender == JARED_ID and about_wynter: