From b2116de6f3ec0273b9ac42c65cfed1615885a3cb Mon Sep 17 00:00:00 2001 From: fegloff Date: Mon, 29 Jan 2024 17:41:16 -0500 Subject: [PATCH] fix prefix command --- src/bot.ts | 1 - src/modules/llms/helpers.ts | 2 +- src/modules/open-ai/helpers.ts | 6 +++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/bot.ts b/src/bot.ts index 904a3fd5..4e3544d3 100644 --- a/src/bot.ts +++ b/src/bot.ts @@ -402,7 +402,6 @@ const onMessage = async (ctx: OnMessageContext): Promise => { } for (const config of Object.values(PayableBots)) { const bot = config.bot - if (!bot.isSupportedEvent(ctx)) { continue } diff --git a/src/modules/llms/helpers.ts b/src/modules/llms/helpers.ts index c582a83d..1c8b168f 100644 --- a/src/modules/llms/helpers.ts +++ b/src/modules/llms/helpers.ts @@ -20,7 +20,7 @@ export enum SupportedCommands { } export const MAX_TRIES = 3 -const LLAMA_PREFIX_LIST = ['*'] +const LLAMA_PREFIX_LIST = ['* '] const BARD_PREFIX_LIST = ['b.', 'B.'] export const isMentioned = ( diff --git a/src/modules/open-ai/helpers.ts b/src/modules/open-ai/helpers.ts index 7bdbd5be..f91fd2b9 100644 --- a/src/modules/open-ai/helpers.ts +++ b/src/modules/open-ai/helpers.ts @@ -27,9 +27,9 @@ export enum SupportedCommands { export const MAX_TRIES = 3 -export const DALLE_PREFIX_LIST = ['i. ', ',', 'image ', 'd.', 'img '] -export const CHAT_GPT_PREFIX_LIST = ['a.', '.'] -export const NEW_PREFIX_LIST = ['n.', '..'] +export const DALLE_PREFIX_LIST = ['i.', ', ', 'image ', 'd.', 'img '] +export const CHAT_GPT_PREFIX_LIST = ['a.', '. '] +export const NEW_PREFIX_LIST = ['n.', '.. '] export const isMentioned = ( ctx: OnMessageContext | OnCallBackQueryData