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})
@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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionollamaApi
(OllamaConnectionDetails connectionDetails, org.springframework.web.client.RestClient.Builder restClientBuilder, org.springframework.web.reactive.function.client.WebClient.Builder webClientBuilder) ollamaChatModel
(OllamaApi ollamaApi, OllamaChatProperties properties, List<FunctionCallback> toolFunctionCallbacks, FunctionCallbackContext functionCallbackContext, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<ChatModelObservationConvention> observationConvention) org.springframework.ai.autoconfigure.ollama.OllamaAutoConfiguration.PropertiesOllamaConnectionDetails
ollamaConnectionDetails
(OllamaConnectionProperties properties) ollamaEmbeddingModel
(OllamaApi ollamaApi, OllamaEmbeddingProperties properties, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<EmbeddingModelObservationConvention> observationConvention) springAiFunctionManager
(org.springframework.context.ApplicationContext context)
-
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.web.client.RestClient.Builder restClientBuilder, org.springframework.web.reactive.function.client.WebClient.Builder webClientBuilder) -
ollamaChatModel
@Bean @ConditionalOnMissingBean @ConditionalOnProperty(prefix="spring.ai.ollama.chat", name="enabled", havingValue="true", matchIfMissing=true) public OllamaChatModel ollamaChatModel(OllamaApi ollamaApi, OllamaChatProperties properties, List<FunctionCallback> toolFunctionCallbacks, FunctionCallbackContext functionCallbackContext, 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, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<EmbeddingModelObservationConvention> observationConvention) -
springAiFunctionManager
@Bean @ConditionalOnMissingBean public FunctionCallbackContext springAiFunctionManager(org.springframework.context.ApplicationContext context)
-