Skip to content

Commit

Permalink
OV-52: * openAi service
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiy4 committed Aug 24, 2024
1 parent 1c3f5ef commit ff6f18c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/bundles/chat/open-ai.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class OpenAIService implements OpenAIServiceModule {
let totalTokens = this.countTokens(messages);

while (totalTokens > maxTokens) {
const removedMessage = messages[1];
const removedMessage = messages[0];

if (!removedMessage) {
break;
Expand Down

0 comments on commit ff6f18c

Please sign in to comment.