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; }