diff --git a/templates/components/vectordbs/typescript/pg/index.ts b/templates/components/vectordbs/typescript/pg/index.ts index 632878f6c..cde8ea8d2 100644 --- a/templates/components/vectordbs/typescript/pg/index.ts +++ b/templates/components/vectordbs/typescript/pg/index.ts @@ -14,6 +14,9 @@ export async function getDataSource(params?: any) { }, schemaName: PGVECTOR_SCHEMA, tableName: PGVECTOR_TABLE, + dimensions: process.env.EMBEDDING_DIM + ? parseInt(process.env.EMBEDDING_DIM) + : undefined, }); return await VectorStoreIndex.fromVectorStore(pgvs); }