Skip to content

Commit

Permalink
added EMBEDDING_DIM if available or undefined to fallback to default …
Browse files Browse the repository at this point in the history
…config (#487)
  • Loading branch information
ravvi-kumar authored Jan 22, 2025
1 parent d4b4338 commit 18c8d25
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions templates/components/vectordbs/typescript/pg/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

0 comments on commit 18c8d25

Please sign in to comment.