diff --git a/bot/utils/cat_client.py b/bot/utils/cat_client.py index 5cb5253..b22a65e 100644 --- a/bot/utils/cat_client.py +++ b/bot/utils/cat_client.py @@ -829,15 +829,16 @@ class CatAdapter: else: logger.debug("evil_miku_personality already active, skipping toggle") - # Step 3: Switch LLM model to darkidol (the uncensored evil model) - if not await self.set_llm_model("darkidol"): - logger.error("Failed to switch Cat LLM to darkidol") + # Step 3: Switch LLM model to the configured evil model (e.g. darkidol) + evil_model = getattr(globals, "EVIL_TEXT_MODEL", "darkidol") + if not await self.set_llm_model(evil_model): + logger.error(f"Failed to switch Cat LLM to {evil_model}") success = False return success async def switch_to_normal_personality(self) -> bool: - """Disable evil_miku_personality, enable miku_personality, switch LLM to llama3.1. + """Disable evil_miku_personality, enable miku_personality, switch LLM to the configured normal model. Checks current plugin state first to avoid double-toggling. Returns True if all operations succeed, False if any fail. @@ -865,9 +866,10 @@ class CatAdapter: else: logger.debug("miku_personality already active, skipping toggle") - # Step 3: Switch LLM model back to llama3.1 (normal model) - if not await self.set_llm_model("llama3.1"): - logger.error("Failed to switch Cat LLM to llama3.1") + # Step 3: Switch LLM model to the configured normal model (e.g. llama3.1) + normal_model = getattr(globals, "TEXT_MODEL", "llama3.1") + if not await self.set_llm_model(normal_model): + logger.error(f"Failed to switch Cat LLM to {normal_model}") success = False return success