GoogleKoogProperties

@ConfigurationProperties(prefix = "ai.koog.google", ignoreUnknownFields = true)
class GoogleKoogProperties(val enabled: Boolean, val apiKey: String, val baseUrl: String, val retry: RetryConfigKoogProperties? = null) : KoogLlmClientProperties(source)

Configuration properties for integrating with Google's LLM services in the Koog framework.

This class provides the necessary settings for enabling and configuring access to Google's LLM API, including authentication and retry behavior. The configuration is mapped using the prefix ai.koog.google.

Parameters:

Parameters

enabled

Indicates whether the Google LLM integration is enabled.

apiKey

The API key used for authenticating requests to Google's services.

baseUrl

The base URL of the Google LLM API.

retry

Optional configuration for retrying failed API calls.

Usage: These properties are automatically bound to the Spring environment when specified in application configuration (e.g., application.yml or application.properties).

Example configuration snippet in application.yml or application.properties:

ai.koog.google.enabled=true
ai.koog.google.api-key=your-google-api-key
ai.koog.google.base-url=https://api.google.com/llm
ai.koog.google.retry.enabled=true
ai.koog.google.retry.max-attempts=3
ai.koog.google.retry.initial-delay=2s
ai.koog.google.retry.max-delay=10s
ai.koog.google.retry.backoff-multiplier=2.0
ai.koog.google.retry.jitter-factor=0.5

Advanced Features:

  • The retry configuration supports customizable retries for handling transient failures.

  • Dedicated masking utility ensures that sensitive information, such as the API key, is not exposed when serialized or logged.

This class is primarily used in conjunction with the GoogleLLMAutoConfiguration auto-configuration class to initialize and configure the necessary beans for interacting with Google's LLM API.

For more details on retry behavior, refer to the RetryConfigKoogProperties class. For shared configuration attributes, see the KoogLlmClientProperties interface.

Constructors

Link copied to clipboard
constructor(enabled: Boolean, apiKey: String, baseUrl: String, retry: RetryConfigKoogProperties? = null)

Types

Link copied to clipboard
object Companion

Companion object for the GoogleKoogProperties class, providing constant values and utilities associated with the configuration of Google-related properties.

Properties

Link copied to clipboard

The key required for authenticating with the API.

Link copied to clipboard
open override val baseUrl: String

URL endpoint for the Google LLM API.

Link copied to clipboard
open override val enabled: Boolean

Enables or disables the Google LLM integration.

Link copied to clipboard
open override val retry: RetryConfigKoogProperties? = null

Defines retry behavior, such as maximum attempts and delays between retries.

Functions

Link copied to clipboard
open override fun toString(): String

Returns a string representation of the GoogleKoogProperties object.