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})
public class OllamaAutoConfiguration
extends Object
Auto-configuration
for Ollama Chat Client.- Since:
- 0.8.0
- Author:
- Christian Tzolov
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionollamaApi
(OllamaConnectionProperties properties, org.springframework.web.client.RestClient.Builder restClientBuilder) ollamaChatClient
(OllamaApi ollamaApi, OllamaChatProperties properties) ollamaEmbeddingClient
(OllamaApi ollamaApi, OllamaEmbeddingProperties properties)
-
Constructor Details
-
OllamaAutoConfiguration
public OllamaAutoConfiguration()
-
-
Method Details
-
ollamaApi
@Bean @ConditionalOnMissingBean public OllamaApi ollamaApi(OllamaConnectionProperties properties, org.springframework.web.client.RestClient.Builder restClientBuilder) -
ollamaChatClient
@Bean @ConditionalOnMissingBean @ConditionalOnProperty(prefix="spring.ai.ollama.chat", name="enabled", havingValue="true", matchIfMissing=true) public OllamaChatClient ollamaChatClient(OllamaApi ollamaApi, OllamaChatProperties properties) -
ollamaEmbeddingClient
@Bean @ConditionalOnMissingBean @ConditionalOnProperty(prefix="spring.ai.ollama.embedding", name="enabled", havingValue="true", matchIfMissing=true) public OllamaEmbeddingClient ollamaEmbeddingClient(OllamaApi ollamaApi, OllamaEmbeddingProperties properties)
-