mirror of
https://github.com/run-llama/LlamaIndexTS.git
synced 2026-07-19 18:43:34 -04:00
fix: supports vercel bundling (#1509)
Co-authored-by: Alex Yang <himself65@outlook.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"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") {
|
||||
|
||||
Reference in New Issue
Block a user