From 28f416da14aca0f7471feaef2a084486fab3220a Mon Sep 17 00:00:00 2001 From: marknguyen1302 Date: Thu, 25 Jul 2024 13:04:29 +0700 Subject: [PATCH] fix: wrong condition to add engine param (#914) --- cortex-js/src/usecases/chat/chat.usecases.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cortex-js/src/usecases/chat/chat.usecases.ts b/cortex-js/src/usecases/chat/chat.usecases.ts index cb884247d..12855ad3b 100644 --- a/cortex-js/src/usecases/chat/chat.usecases.ts +++ b/cortex-js/src/usecases/chat/chat.usecases.ts @@ -52,7 +52,7 @@ export class ChatUsecases { } const payload = { ...createChatDto, - ...(model.engine && isRemoteEngine(model.engine) && { engine: model.engine }), + ...(model.engine && !isRemoteEngine(model.engine) && { engine: model.engine }), }; try { return await engine.inference(