OpenAILLMAutoConfiguration
Auto-configuration class for setting up OpenAI LLM client and related beans. This class utilizes the properties defined in OpenAIKoogProperties to configure and initialize OpenAI-related components, including the client and executor.
The configuration is conditionally applied if the property ai.koog.openai.api-key
is set to true
. It reads additional configuration from the properties file located at classpath:/META-INF/config/koog/openai-llm.properties
.
Key Features:
Sets up the OpenAILLMClient bean with API key and base URL from the provided properties.
Configures a SingleLLMPromptExecutor bean using the configured OpenAI client with retry capabilities.
Usage Notes:
To activate, ensure the
ai.koog.openai.api-key
property is defined in your application configuration.Customize behavior and settings using the
ai.koog.openai.*
configuration properties.
See also
Functions
Creates and returns a SingleLLMPromptExecutor bean configured with the given OpenAILLMClient. This bean is conditionally initialized only when an OpenAILLMClient bean is present in the application context.
Creates an OpenAILLMClient bean configured with application properties.