PostgreSQL (pgvector)
Installation
Section titled “Installation”<dependency> <groupId>com.google.genkit</groupId> <artifactId>genkit-plugin-postgresql</artifactId> <version>1.0.0-SNAPSHOT</version></dependency>Requirements
Section titled “Requirements”- PostgreSQL 12+ with the pgvector extension installed
- Java 21+
import com.google.genkit.plugins.postgresql.PostgreSQLPlugin;
Genkit genkit = Genkit.builder() .plugin(PostgreSQLPlugin.create( "jdbc:postgresql://localhost:5432/mydb", "user", "password")) .build();Features
Section titled “Features”- Cosine, L2, and inner product similarity search
- Automatic schema management
- Connection pooling
- Batch indexing
- Metadata support
Sample
Section titled “Sample”See the postgresql sample.