Skip to content
Snippets Groups Projects
Unverified Commit 804c5751 authored by JT-Dev-215's avatar JT-Dev-215 Committed by GitHub
Browse files

fix: PGVector similarity score (#817)

parent ce94780b
No related branches found
No related tags found
No related merge requests found
...@@ -294,7 +294,7 @@ export class PGVectorStore implements VectorStore { ...@@ -294,7 +294,7 @@ export class PGVectorStore implements VectorStore {
const ret = { const ret = {
nodes: nodes, nodes: nodes,
similarities: results.rows.map((row) => row.s), similarities: results.rows.map((row) => 1 - row.s),
ids: results.rows.map((row) => row.id), ids: results.rows.map((row) => row.id),
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment