Spring Ai Embedding Service
data class SpringAiEmbeddingService(val name: String, val provider: String, val model: <Error class: unknown class>, val configuredDimensions: Int? = null, val pricingModel: PricingModel? = null) : EmbeddingService, AiModel<<Error class: unknown class>>
Wraps a Spring AI EmbeddingModel exposing an embedding service.
Parameters
configured Dimensions
If provided, uses this value for dimensions instead of making a live API call via EmbeddingModel.dimensions. This avoids startup failures when the embedding endpoint is not available (e.g., Azure OpenAI deployments that only expose chat completions).
Constructors
Link copied to clipboard
constructor(name: String, provider: String, model: <Error class: unknown class>, configuredDimensions: Int? = null, pricingModel: PricingModel? = null)
Properties
Link copied to clipboard
Whether this service is standing in for a model the deployment does not have a key for yet, so nothing may be embedded and — above all — no dimension may be read from it.
Link copied to clipboard
Link copied to clipboard
Dimension of the embedding vectors produced by this model
Link copied to clipboard
The pricing model for the embedding service, if known. Null for local models (Ollama, ONNX) where the cost is zero.