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!spring-doc.cn

Refer to the Dependency Management section to add the Spring AI BOM to your build file.

Propertyspring-doc.cn

Descriptionspring-doc.cn

Defaultspring-doc.cn

spring.ai.postgresml.embedding.enabledspring-doc.cn

Enable PostgresML embedding model.spring-doc.cn

truespring-doc.cn

spring.ai.postgresml.embedding.options.transformerspring-doc.cn

The Hugging Face transformer model to use for the embedding.spring-doc.cn

distilbert-base-uncasedspring-doc.cn

spring.ai.postgresml.embedding.options.kwargsspring-doc.cn

Additional transformer specific options.spring-doc.cn

empty mapspring-doc.cn

spring.ai.postgresml.embedding.options.vectorTypespring-doc.cn

PostgresML vector type to use for the embedding. Two options are supported: PG_ARRAY and PG_VECTOR.spring-doc.cn

PG_ARRAYspring-doc.cn

spring.ai.postgresml.embedding.options.metadataModespring-doc.cn

Document metadata aggregation modespring-doc.cn

EMBEDspring-doc.cn

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: