8ball: fix substring pronoun bug, switch to 3B model
- 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:
@@ -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:
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ LOG_LEVEL = os.getenv("LOG_LEVEL", "INFO")
|
||||
# Integrations
|
||||
OLLAMA_URL = os.getenv("OLLAMA_URL", "http://10.10.10.157:11434")
|
||||
OLLAMA_MODEL = os.getenv("OLLAMA_MODEL", "llama3.2:latest")
|
||||
BALL_MODEL = os.getenv("BALL_MODEL", "sadiq-bd/llama3.2-1b-uncensored:latest")
|
||||
BALL_MODEL = os.getenv("BALL_MODEL", "llama3.2:latest")
|
||||
ASK_MODEL = os.getenv("ASK_MODEL", "llama3.2:latest")
|
||||
MINECRAFT_RCON_HOST = os.getenv("MINECRAFT_RCON_HOST", "10.10.10.67")
|
||||
MINECRAFT_RCON_PORT = int(os.getenv("MINECRAFT_RCON_PORT", "25575"))
|
||||
|
||||
Reference in New Issue
Block a user