Skip to content

Commit 18c8d25

Browse files
authored
added EMBEDDING_DIM if available or undefined to fallback to default config (#487)
1 parent d4b4338 commit 18c8d25

File tree

1 file changed

+3
-0
lines changed
  • templates/components/vectordbs/typescript/pg

1 file changed

+3
-0
lines changed

templates/components/vectordbs/typescript/pg/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ export async function getDataSource(params?: any) {
1414
},
1515
schemaName: PGVECTOR_SCHEMA,
1616
tableName: PGVECTOR_TABLE,
17+
dimensions: process.env.EMBEDDING_DIM
18+
? parseInt(process.env.EMBEDDING_DIM)
19+
: undefined,
1720
});
1821
return await VectorStoreIndex.fromVectorStore(pgvs);
1922
}

0 commit comments

Comments
 (0)