This version is still in development and is not considered stable yet. For the latest snapshot version, please use Spring AI 1.0.0-SNAPSHOT! |
Refer to the Dependency Management section to add the Spring AI BOM to your build file. |
Property |
Description |
Default |
spring.ai.postgresml.embedding.enabled |
Enable PostgresML embedding model. |
true |
spring.ai.postgresml.embedding.options.transformer |
The Hugging Face transformer model to use for the embedding. |
distilbert-base-uncased |
spring.ai.postgresml.embedding.options.kwargs |
Additional transformer specific options. |
empty map |
spring.ai.postgresml.embedding.options.vectorType |
PostgresML vector type to use for the embedding. Two options are supported: |
PG_ARRAY |
spring.ai.postgresml.embedding.options.metadataMode |
Document metadata aggregation mode |
EMBED |
All properties prefixed with spring.ai.postgresml.embedding.options can be overridden at runtime by adding a request specific Runtime Options to the EmbeddingRequest call.
|
Refer to the Dependency Management section to add the Spring AI BOM to your build file. |
When created manually, you must call the afterPropertiesSet() after setting the properties and before using the client.
It is more convenient (and preferred) to create the PostgresMlEmbeddingModel as a @Bean .
Then you don’t have to call the afterPropertiesSet() manually:
|