From 1c3f5efd13eb65362ede76f502b4a1ef490f76b2 Mon Sep 17 00:00:00 2001 From: Sergiy Date: Sat, 24 Aug 2024 14:54:39 +0300 Subject: [PATCH] OV-52: * openAi service --- backend/src/bundles/chat/open-ai.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/bundles/chat/open-ai.service.ts b/backend/src/bundles/chat/open-ai.service.ts index 96f79a6b9..6005a2f71 100644 --- a/backend/src/bundles/chat/open-ai.service.ts +++ b/backend/src/bundles/chat/open-ai.service.ts @@ -72,7 +72,7 @@ class OpenAIService implements OpenAIServiceModule { break; } - messages.splice(1, 1); + messages.splice(0, 1); totalTokens -= this.modelEncoding.encode( removedMessage.content,