From de6c5da4640943b6ed90e8d14cab6f0bc51609cdf0777788e8d3c14dcafea9fc Mon Sep 17 00:00:00 2001 From: aslan Date: Sat, 24 Jan 2026 04:58:23 -0500 Subject: [PATCH] Add smart models --- src/modules/ai/ai.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/modules/ai/ai.ts b/src/modules/ai/ai.ts index 702887b..344dd13 100644 --- a/src/modules/ai/ai.ts +++ b/src/modules/ai/ai.ts @@ -48,7 +48,7 @@ const onAI = async ( const useSmartModel = text.startsWith("!aipro"); - let textMod = text.replace("!ai", "").trim(); + let textMod = text.replace("!aipro", "").replace("!ai", "").trim(); let instructions = { prefferedLanguages: ["english", "slovak"], users: alts.map((alt) => ({ @@ -105,7 +105,11 @@ const onImageGen = async (text: string, roomId: string, sender: string) => { const useSmartModel = text.startsWith("!imgpro"); - let textMod = text.replace("!img", "").trim().toLowerCase(); + let textMod = text + .replace("!imgpro", "") + .replace("!img", "") + .trim() + .toLowerCase(); alts.forEach((alt) => { alt.keys.forEach((key) => { textMod = textMod.replaceAll(key, alt.alt);