OllamaLLMAutoConfiguration
Auto-configuration class for integrating the Ollama Large Language Model (LLM) service into applications.
This configuration initializes and provides the necessary beans to enable interaction with the Ollama LLM API. It relies on properties defined in the OllamaKoogProperties class to set up the service.
The configuration is conditional and will only be initialized if:
OllamaKoogProperties.enabled is set to
true
.The required OllamaKoogProperties are provided in the application configuration.
Initializes the following beans:
OllamaClient: A client for interacting with the Ollama LLM service.
SingleLLMPromptExecutor: Executes single-prompt interactions with Ollama, utilizing the client.
This configuration allows seamless integration with the Ollama API while enabling properties-based customization.
See also
Functions
Creates and configures an instance of SingleLLMPromptExecutor that wraps the provided OllamaClient. The configured executor includes retry capabilities based on the application's properties.
Creates an OllamaClient bean configured with application properties.