Fix PgVectorStoreWithChatMemoryAdvisorIT

- Use the PgVectorStoreBuilder to create the instance of PgVectorStore
This commit is contained in:
Ilayaperumal Gopinathan
2024-12-20 20:38:01 +00:00
parent 1e68862142
commit a0ef1179c4

View File

@@ -84,9 +84,10 @@ class PgVectorStoreWithChatMemoryAdvisorIT {
private static PgVectorStore createPgVectorStoreUsingTestcontainer(EmbeddingModel embeddingModel) throws Exception {
JdbcTemplate jdbcTemplate = createJdbcTemplateWithConnectionToTestcontainer();
PgVectorStore vectorStore = new PgVectorStore.Builder(jdbcTemplate, embeddingModel).withDimensions(3) // match
PgVectorStore vectorStore = PgVectorStore.builder(jdbcTemplate, embeddingModel)
.dimensions(3) // match
// embeddings
.withInitializeSchema(true)
.initializeSchema(true)
.build();
initStore(vectorStore);
return vectorStore;