From 2ef4c5896d999c283403c535c2569a23c618b730 Mon Sep 17 00:00:00 2001 From: serafettin Date: Tue, 23 Jul 2024 00:04:54 -0400 Subject: [PATCH] Update agent.module.ts --- indexer/src/app/modules/agent.module.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/indexer/src/app/modules/agent.module.ts b/indexer/src/app/modules/agent.module.ts index a9799f2f..8bf86287 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.slice(-1)), + formatChatHistory(requestMessages), ); payload.vector = queryVector; } @@ -120,6 +120,12 @@ export class Agent { retrievedDocs = response.data .map((doc: any) => JSON.stringify(doc)) .join('\n'); + + console.log({ + payload, + requestMessages, + retrievedDocs, + }); } const parser = new StringOutputParser();