Skip to content

Commit

Permalink
fix: parse array from string
Browse files Browse the repository at this point in the history
  • Loading branch information
anadi45 committed Dec 27, 2024
1 parent dd376f7 commit 5edb746
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/langchain-community/src/vectorstores/pgvector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -922,8 +922,8 @@ export class PGVectorStore extends VectorStore {
true
);

const embeddingList = docs.map(
(doc) => doc[0].metadata[this.vectorColumnName]
const embeddingList = docs.map((doc) =>
JSON.parse(doc[0].metadata[this.vectorColumnName])
);

const mmrIndexes = maximalMarginalRelevance(
Expand Down

0 comments on commit 5edb746

Please sign in to comment.