From 4a6b4e5f65d36d6af15ace9b022a0efbd1652fe2 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Thu, 25 Apr 2024 16:31:02 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BC=98=E5=8C=96=E3=80=91=E4=BC=98?= =?UTF-8?q?=E5=8C=96=20chat=20=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/config/YudaoAiAutoConfiguration.java | 28 ------------------- 1 file changed, 28 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java index 7e734cd2a..cefe096e8 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/config/YudaoAiAutoConfiguration.java @@ -12,15 +12,10 @@ import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanChatClient; import cn.iocoder.yudao.framework.ai.chatyiyan.YiYanOptions; import cn.iocoder.yudao.framework.ai.chatyiyan.api.YiYanApi; import cn.iocoder.yudao.framework.ai.exception.AiException; -import org.springframework.beans.BeansException; -import org.springframework.beans.factory.InitializingBean; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.context.ApplicationContext; -import org.springframework.context.ApplicationContextAware; import org.springframework.context.annotation.Bean; -import org.springframework.context.support.GenericApplicationContext; import java.util.HashMap; import java.util.Map; @@ -65,29 +60,6 @@ public class YudaoAiAutoConfiguration { return chatMap; } - public static class InitChatClient implements InitializingBean, ApplicationContextAware { - - private GenericApplicationContext applicationContext; - private YudaoAiProperties yudaoAiProperties; - - public InitChatClient(YudaoAiProperties yudaoAiProperties) { - this.yudaoAiProperties = yudaoAiProperties; - } - - @Override - public void afterPropertiesSet() { - - - System.err.println(applicationContext.getBean("qianWen")); - System.err.println(applicationContext.getBean("yiYan")); - } - - @Override - public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { - this.applicationContext = (GenericApplicationContext) applicationContext; - } - } - private static Object createChatClient(YudaoAiProperties.ChatProperties chatProperties) { if (AiPlatformEnum.XING_HUO == chatProperties.getAiPlatform()) { YudaoAiProperties.XingHuoProperties xingHuoProperties = (YudaoAiProperties.XingHuoProperties) chatProperties;