Skip to content
Snippets Groups Projects
Unverified Commit 02b22da3 authored by Madarco's avatar Madarco Committed by GitHub
Browse files

fix: supports vercel bundling (#1509)


Co-authored-by: default avatarAlex Yang <himself65@outlook.com>
parent 0aa61db5
No related branches found
No related tags found
No related merge requests found
---
"llamaindex": patch
---
fix: supports Vercel bundling
......@@ -176,7 +176,12 @@ export class PGVectorStore extends BaseVectorStore {
if ("clientConfig" in config) {
this.clientConfig = config.clientConfig;
} else {
if (config.client.constructor.name.includes("Vercel")) {
if (
config.client.constructor.name.includes("Vercel") ||
(!!(config.client as VercelPool).connect &&
!!(config.client as VercelPool).query &&
!(config.client as Sql).unsafe)
) {
this.isDBConnected = true;
this.db = fromVercelPool(config.client as unknown as VercelPool);
} else if (typeof config.client === "function") {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment