fix(oss): make pgvector pg import compatible with ESM (#4544)

This commit is contained in:
Felippe Mercurio
2026-03-26 11:37:39 -03:00
committed by GitHub
parent 515f87b6bd
commit 3a9fcdbec2
@@ -1,4 +1,6 @@
import { Client } from "pg";
import type { Client as ClientType } from "pg";
import pkg from "pg";
const { Client } = pkg;
import { VectorStore } from "./base";
import { SearchFilters, VectorStoreConfig, VectorStoreResult } from "../types";
@@ -14,7 +16,7 @@ interface PGVectorConfig extends VectorStoreConfig {
}
export class PGVector implements VectorStore {
private client: Client;
private client: ClientType;
private collectionName: string;
private useDiskann: boolean;
private useHnsw: boolean;