Fix: add pgvector support to NodeJS OSS VectorStoreFactory (fixes #3491) (#3997)

Co-authored-by: kartik-mem0 <kartik.labhshetwar@mem0.ai>
This commit is contained in:
Varun Chawla
2026-03-20 08:17:04 -07:00
committed by GitHub
parent 7ad5d6f442
commit 30661ab427
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -26,4 +26,5 @@ export * from "./vector_stores/supabase";
export * from "./vector_stores/langchain";
export * from "./vector_stores/vectorize";
export * from "./vector_stores/azure_ai_search";
export * from "./vector_stores/pgvector";
export * from "./utils/factory";
+3
View File
@@ -34,6 +34,7 @@ import { LangchainLLM } from "../llms/langchain";
import { LangchainEmbedder } from "../embeddings/langchain";
import { LangchainVectorStore } from "../vector_stores/langchain";
import { AzureAISearch } from "../vector_stores/azure_ai_search";
import { PGVector } from "../vector_stores/pgvector";
export class EmbedderFactory {
static create(provider: string, config: EmbeddingConfig): Embedder {
@@ -104,6 +105,8 @@ export class VectorStoreFactory {
return new VectorizeDB(config as any);
case "azure-ai-search":
return new AzureAISearch(config as any);
case "pgvector":
return new PGVector(config as any);
default:
throw new Error(`Unsupported vector store provider: ${provider}`);
}