Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblee93 committed Jan 2, 2025
1 parent f589d44 commit 55b0b31
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ describe("PGVectorStore", () => {
expect(results).toHaveLength(1);
expect(results[0].pageContent).toEqual("Cat drinks milk");
});

test.only("Test MMR search", async () => {
const documents = [
{
Expand All @@ -91,9 +91,12 @@ describe("PGVectorStore", () => {
{ pageContent: "hi", metadata: { a: 1 } },
];
await pgvectorVectorStore.addDocuments(documents);
const results = await pgvectorVectorStore.maxMarginalRelevanceSearch("milk", {
k: 2,
});
const results = await pgvectorVectorStore.maxMarginalRelevanceSearch(
"milk",
{
k: 2,
}
);

expect(results).toHaveLength(2);
expect(results[0].pageContent).toEqual("Cat drinks milk");
Expand Down

0 comments on commit 55b0b31

Please sign in to comment.