diff --git a/spring-ai-spring-boot-autoconfigure/src/main/java/org/springframework/ai/autoconfigure/ollama/OllamaChatProperties.java b/spring-ai-spring-boot-autoconfigure/src/main/java/org/springframework/ai/autoconfigure/ollama/OllamaChatProperties.java index 1b07aca6f..7e662836f 100644 --- a/spring-ai-spring-boot-autoconfigure/src/main/java/org/springframework/ai/autoconfigure/ollama/OllamaChatProperties.java +++ b/spring-ai-spring-boot-autoconfigure/src/main/java/org/springframework/ai/autoconfigure/ollama/OllamaChatProperties.java @@ -18,6 +18,7 @@ package org.springframework.ai.autoconfigure.ollama; import org.springframework.ai.ollama.api.OllamaOptions; import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.NestedConfigurationProperty; /** * Ollama Chat autoconfiguration properties. @@ -40,6 +41,7 @@ public class OllamaChatProperties { * topK and topP and alike parameters. The null values are ignored defaulting to the * generative's defaults. */ + @NestedConfigurationProperty private OllamaOptions options = new OllamaOptions(); public String getModel() { diff --git a/spring-ai-spring-boot-autoconfigure/src/main/java/org/springframework/ai/autoconfigure/ollama/OllamaEmbeddingProperties.java b/spring-ai-spring-boot-autoconfigure/src/main/java/org/springframework/ai/autoconfigure/ollama/OllamaEmbeddingProperties.java index f4039bf57..cade107fa 100644 --- a/spring-ai-spring-boot-autoconfigure/src/main/java/org/springframework/ai/autoconfigure/ollama/OllamaEmbeddingProperties.java +++ b/spring-ai-spring-boot-autoconfigure/src/main/java/org/springframework/ai/autoconfigure/ollama/OllamaEmbeddingProperties.java @@ -18,6 +18,7 @@ package org.springframework.ai.autoconfigure.ollama; import org.springframework.ai.ollama.api.OllamaOptions; import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.NestedConfigurationProperty; /** * Ollama Embedding autoconfiguration properties. @@ -40,6 +41,7 @@ public class OllamaEmbeddingProperties { * topK and topP and alike parameters. The null values are ignored defaulting to the * generative's defaults. */ + @NestedConfigurationProperty private OllamaOptions options = new OllamaOptions(); public String getModel() {