Class GoogleGenAiChatAutoConfiguration

java.lang.Object
org.springframework.ai.model.google.genai.autoconfigure.chat.GoogleGenAiChatAutoConfiguration

@AutoConfiguration @ConditionalOnClass({com.google.genai.Client.class,org.springframework.ai.google.genai.GoogleGenAiChatModel.class}) @ConditionalOnProperty(name="spring.ai.model.chat", havingValue="google-genai", matchIfMissing=true) @EnableConfigurationProperties({GoogleGenAiChatProperties.class,GoogleGenAiConnectionProperties.class}) public class GoogleGenAiChatAutoConfiguration extends Object
Auto-configuration for Google GenAI Chat.
Since:
1.1.0
Author:
Christian Tzolov, Soby Chacko, Mark Pollack, Ilayaperumal Gopinathan, Yanming Zhou, Sebastien Deleuze
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable org.springframework.ai.google.genai.cache.GoogleGenAiCachedContentService
    googleGenAiCachedContentService(org.springframework.ai.google.genai.GoogleGenAiChatModel chatModel)
     
    org.springframework.ai.google.genai.GoogleGenAiChatModel
    googleGenAiChatModel(com.google.genai.Client googleGenAiClient, GoogleGenAiChatProperties chatProperties, org.springframework.ai.model.tool.ToolCallingManager toolCallingManager, org.springframework.context.ApplicationContext context, org.springframework.beans.factory.ObjectProvider<org.springframework.core.retry.RetryTemplate> retryTemplate, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<org.springframework.ai.chat.observation.ChatModelObservationConvention> observationConvention)
     
    com.google.genai.Client
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GoogleGenAiChatAutoConfiguration

      public GoogleGenAiChatAutoConfiguration()
  • Method Details

    • googleGenAiClient

      @Bean @ConditionalOnMissingBean public com.google.genai.Client googleGenAiClient(GoogleGenAiConnectionProperties properties) throws IOException
      Throws:
      IOException
    • googleGenAiChatModel

      @Bean @ConditionalOnMissingBean public org.springframework.ai.google.genai.GoogleGenAiChatModel googleGenAiChatModel(com.google.genai.Client googleGenAiClient, GoogleGenAiChatProperties chatProperties, org.springframework.ai.model.tool.ToolCallingManager toolCallingManager, org.springframework.context.ApplicationContext context, org.springframework.beans.factory.ObjectProvider<org.springframework.core.retry.RetryTemplate> retryTemplate, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<org.springframework.ai.chat.observation.ChatModelObservationConvention> observationConvention)
    • googleGenAiCachedContentService

      @Bean @ConditionalOnBean(org.springframework.ai.google.genai.GoogleGenAiChatModel.class) @ConditionalOnMissingBean @Conditional(CachedContentServiceCondition.class) @ConditionalOnProperty(prefix="spring.ai.google.genai.chat", name="enable-cached-content", havingValue="true", matchIfMissing=true) public @Nullable org.springframework.ai.google.genai.cache.GoogleGenAiCachedContentService googleGenAiCachedContentService(org.springframework.ai.google.genai.GoogleGenAiChatModel chatModel)