Skip to content

Commit

Permalink
Update agent.module.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
serefyarar committed Jul 23, 2024
1 parent a71b7ac commit 2ef4c58
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion indexer/src/app/modules/agent.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export class Agent {
});

const queryVector = await embeddingModel.embedQuery(
formatChatHistory(requestMessages.slice(-1)),
formatChatHistory(requestMessages),
);
payload.vector = queryVector;
}
Expand All @@ -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();
Expand Down

0 comments on commit 2ef4c58

Please sign in to comment.