From a71b7ac2c6dd23bc6066a84a3123ecb430b38943 Mon Sep 17 00:00:00 2001 From: serafettin Date: Mon, 22 Jul 2024 23:55:44 -0400 Subject: [PATCH] Update agent.module.ts --- indexer/src/app/modules/agent.module.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indexer/src/app/modules/agent.module.ts b/indexer/src/app/modules/agent.module.ts index 8d614371..a9799f2f 100644 --- a/indexer/src/app/modules/agent.module.ts +++ b/indexer/src/app/modules/agent.module.ts @@ -106,7 +106,7 @@ export class Agent { }); const queryVector = await embeddingModel.embedQuery( - formatChatHistory(requestMessages), + formatChatHistory(requestMessages.slice(-1)), ); payload.vector = queryVector; }