Class OllamaAutoConfiguration

java.lang.Object
org.springframework.ai.autoconfigure.ollama.OllamaAutoConfiguration

@AutoConfiguration(after=org.springframework.boot.autoconfigure.web.client.RestClientAutoConfiguration.class) @ConditionalOnClass(OllamaApi.class) @EnableConfigurationProperties({OllamaChatProperties.class,OllamaEmbeddingProperties.class,OllamaConnectionProperties.class,OllamaInitializationProperties.class}) @ImportAutoConfiguration(classes={org.springframework.boot.autoconfigure.web.client.RestClientAutoConfiguration.class,org.springframework.boot.autoconfigure.web.reactive.function.client.WebClientAutoConfiguration.class}) public class OllamaAutoConfiguration extends Object
Auto-configuration for Ollama Chat Client.
Since:
0.8.0
Author:
Christian Tzolov, EddĂș MelĂ©ndez, Thomas Vitale
  • Constructor Details

    • OllamaAutoConfiguration

      public OllamaAutoConfiguration()
  • Method Details

    • ollamaConnectionDetails

      @Bean @ConditionalOnMissingBean(OllamaConnectionDetails.class) public org.springframework.ai.autoconfigure.ollama.OllamaAutoConfiguration.PropertiesOllamaConnectionDetails ollamaConnectionDetails(OllamaConnectionProperties properties)
    • ollamaApi

      @Bean @ConditionalOnMissingBean public OllamaApi ollamaApi(OllamaConnectionDetails connectionDetails, org.springframework.beans.factory.ObjectProvider<org.springframework.web.client.RestClient.Builder> restClientBuilderProvider, org.springframework.beans.factory.ObjectProvider<org.springframework.web.reactive.function.client.WebClient.Builder> webClientBuilderProvider)
    • ollamaChatModel

      @Bean @ConditionalOnMissingBean @ConditionalOnProperty(prefix="spring.ai.ollama.chat", name="enabled", havingValue="true", matchIfMissing=true) public OllamaChatModel ollamaChatModel(OllamaApi ollamaApi, OllamaChatProperties properties, OllamaInitializationProperties initProperties, List<FunctionCallback> toolFunctionCallbacks, FunctionCallbackResolver functionCallbackResolver, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<ChatModelObservationConvention> observationConvention)
    • ollamaEmbeddingModel

      @Bean @ConditionalOnMissingBean @ConditionalOnProperty(prefix="spring.ai.ollama.embedding", name="enabled", havingValue="true", matchIfMissing=true) public OllamaEmbeddingModel ollamaEmbeddingModel(OllamaApi ollamaApi, OllamaEmbeddingProperties properties, OllamaInitializationProperties initProperties, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<EmbeddingModelObservationConvention> observationConvention)
    • springAiFunctionManager

      @Bean @ConditionalOnMissingBean public FunctionCallbackResolver springAiFunctionManager(org.springframework.context.ApplicationContext context)