Class ZhiPuAiAutoConfiguration

java.lang.Object
org.springframework.ai.autoconfigure.zhipuai.ZhiPuAiAutoConfiguration

@AutoConfiguration(after={org.springframework.boot.autoconfigure.web.client.RestClientAutoConfiguration.class,SpringAiRetryAutoConfiguration.class}) @ConditionalOnClass(org.springframework.ai.zhipuai.api.ZhiPuAiApi.class) @EnableConfigurationProperties({ZhiPuAiConnectionProperties.class,ZhiPuAiChatProperties.class,ZhiPuAiEmbeddingProperties.class,ZhiPuAiImageProperties.class}) public class ZhiPuAiAutoConfiguration extends Object
Auto-configuration for ZhiPuAI.
Author:
Geng Rong
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.ai.model.function.FunctionCallbackResolver
    springAiFunctionManager(org.springframework.context.ApplicationContext context)
     
    zhiPuAiChatModel(ZhiPuAiConnectionProperties commonProperties, ZhiPuAiChatProperties chatProperties, org.springframework.beans.factory.ObjectProvider<org.springframework.web.client.RestClient.Builder> restClientBuilderProvider, List<org.springframework.ai.model.function.FunctionCallback> toolFunctionCallbacks, org.springframework.ai.model.function.FunctionCallbackResolver functionCallbackResolver, org.springframework.retry.support.RetryTemplate retryTemplate, org.springframework.web.client.ResponseErrorHandler responseErrorHandler, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<org.springframework.ai.chat.observation.ChatModelObservationConvention> observationConvention)
     
    zhiPuAiEmbeddingModel(ZhiPuAiConnectionProperties commonProperties, ZhiPuAiEmbeddingProperties embeddingProperties, org.springframework.web.client.RestClient.Builder restClientBuilder, org.springframework.retry.support.RetryTemplate retryTemplate, org.springframework.web.client.ResponseErrorHandler responseErrorHandler, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<org.springframework.ai.embedding.observation.EmbeddingModelObservationConvention> observationConvention)
     
    zhiPuAiImageModel(ZhiPuAiConnectionProperties commonProperties, ZhiPuAiImageProperties imageProperties, org.springframework.web.client.RestClient.Builder restClientBuilder, org.springframework.retry.support.RetryTemplate retryTemplate, org.springframework.web.client.ResponseErrorHandler responseErrorHandler)
     

    Methods inherited from class java.lang.Object

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

    • ZhiPuAiAutoConfiguration

      public ZhiPuAiAutoConfiguration()
  • Method Details

    • zhiPuAiChatModel

      @Bean @ConditionalOnMissingBean @ConditionalOnProperty(prefix="spring.ai.zhipuai.chat", name="enabled", havingValue="true", matchIfMissing=true) public ZhiPuAiChatModel zhiPuAiChatModel(ZhiPuAiConnectionProperties commonProperties, ZhiPuAiChatProperties chatProperties, org.springframework.beans.factory.ObjectProvider<org.springframework.web.client.RestClient.Builder> restClientBuilderProvider, List<org.springframework.ai.model.function.FunctionCallback> toolFunctionCallbacks, org.springframework.ai.model.function.FunctionCallbackResolver functionCallbackResolver, org.springframework.retry.support.RetryTemplate retryTemplate, org.springframework.web.client.ResponseErrorHandler responseErrorHandler, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<org.springframework.ai.chat.observation.ChatModelObservationConvention> observationConvention)
    • zhiPuAiEmbeddingModel

      @Bean @ConditionalOnMissingBean @ConditionalOnProperty(prefix="spring.ai.zhipuai.embedding", name="enabled", havingValue="true", matchIfMissing=true) public ZhiPuAiEmbeddingModel zhiPuAiEmbeddingModel(ZhiPuAiConnectionProperties commonProperties, ZhiPuAiEmbeddingProperties embeddingProperties, org.springframework.web.client.RestClient.Builder restClientBuilder, org.springframework.retry.support.RetryTemplate retryTemplate, org.springframework.web.client.ResponseErrorHandler responseErrorHandler, org.springframework.beans.factory.ObjectProvider<io.micrometer.observation.ObservationRegistry> observationRegistry, org.springframework.beans.factory.ObjectProvider<org.springframework.ai.embedding.observation.EmbeddingModelObservationConvention> observationConvention)
    • zhiPuAiImageModel

      @Bean @ConditionalOnMissingBean @ConditionalOnProperty(prefix="spring.ai.zhipuai.image", name="enabled", havingValue="true", matchIfMissing=true) public ZhiPuAiImageModel zhiPuAiImageModel(ZhiPuAiConnectionProperties commonProperties, ZhiPuAiImageProperties imageProperties, org.springframework.web.client.RestClient.Builder restClientBuilder, org.springframework.retry.support.RetryTemplate retryTemplate, org.springframework.web.client.ResponseErrorHandler responseErrorHandler)
    • springAiFunctionManager

      @Bean @ConditionalOnMissingBean public org.springframework.ai.model.function.FunctionCallbackResolver springAiFunctionManager(org.springframework.context.ApplicationContext context)