GoogleLLMAutoConfiguration

@AutoConfiguration
@PropertySource(value = ["classpath:/META-INF/config/koog/google-llm.properties"])
@EnableConfigurationProperties(value = [GoogleKoogProperties::class])
class GoogleLLMAutoConfiguration(properties: GoogleKoogProperties)(source)

Provides the auto-configuration for integrating with Google LLM via the Koog framework. This class is responsible for initializing and configuring the necessary beans for interacting with Google's APIs, based on the configurations supplied via GoogleKoogProperties.

The configuration is activated only when the property ai.koog.google.enabled is set to true, and an api-key is provided.

Beans configured by this class:

  • GoogleLLMClient: A client for interacting with Google's LLM API, using the specified API key and settings.

  • SingleLLMPromptExecutor: An executor capable of handling and retrying LLM prompts, using the initialized client.

An external configuration file at classpath:/META-INF/config/koog/google-llm.properties is leveraged for managing default settings.

See also

Constructors

Link copied to clipboard
constructor(properties: GoogleKoogProperties)

Functions

Link copied to clipboard
@Bean
@ConditionalOnBean(value = [GoogleLLMClient::class])
fun googleExecutor(client: GoogleLLMClient): SingleLLMPromptExecutor

Creates and configures a SingleLLMPromptExecutor instance using GoogleLLMClient properties.

Link copied to clipboard
@Bean
@ConditionalOnProperty(prefix = "ai.koog.google", name = ["enabled"], havingValue = "true")
fun googleLLMClient(): GoogleLLMClient

Creates a GoogleLLMClient bean configured with application properties.