From 430dc99d124a695e00af55bbc9ec6fdee324a026 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 23 Feb 2025 18:29:33 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= =?UTF-8?q?=E3=80=91AI=EF=BC=9A=E9=80=82=E9=85=8D=20Spring=20AI=201.0.6=20?= =?UTF-8?q?=E5=AF=B9=20ZhiPu=20=E7=9A=84=E5=85=BC=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yudao/framework/ai/chat/ZhiPuAiChatModelTests.java | 9 ++++++--- .../yudao/framework/ai/image/ZhiPuAiImageModelTests.java | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/ZhiPuAiChatModelTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/ZhiPuAiChatModelTests.java index 101be34b7b..4517482a06 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/ZhiPuAiChatModelTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/chat/ZhiPuAiChatModelTests.java @@ -22,9 +22,12 @@ import java.util.List; */ public class ZhiPuAiChatModelTests { - private final ZhiPuAiApi zhiPuAiApi = new ZhiPuAiApi("32f84543e54eee31f8d56b2bd6020573.3vh9idLJZ2ZhxDEs"); - private final ZhiPuAiChatModel chatModel = new ZhiPuAiChatModel(zhiPuAiApi, - ZhiPuAiChatOptions.builder().model(ZhiPuAiApi.ChatModel.GLM_4.getName()).build()); + private final ZhiPuAiChatModel chatModel = new ZhiPuAiChatModel( + new ZhiPuAiApi("32f84543e54eee31f8d56b2bd6020573.3vh9idLJZ2ZhxDEs"), // 密钥 + ZhiPuAiChatOptions.builder() + .model(ZhiPuAiApi.ChatModel.GLM_4.getName()) // 模型 + .build() + ); @Test @Disabled diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/ZhiPuAiImageModelTests.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/ZhiPuAiImageModelTests.java index f4802d4d21..cb0b4efb78 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/ZhiPuAiImageModelTests.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/test/java/cn/iocoder/yudao/framework/ai/image/ZhiPuAiImageModelTests.java @@ -13,9 +13,9 @@ import org.springframework.ai.zhipuai.api.ZhiPuAiImageApi; */ public class ZhiPuAiImageModelTests { - private final ZhiPuAiImageApi imageApi = new ZhiPuAiImageApi( - "78d3228c1d9e5e342a3e1ab349e2dd7b.VXLoq5vrwK2ofboy"); - private final ZhiPuAiImageModel imageModel = new ZhiPuAiImageModel(imageApi); + private final ZhiPuAiImageModel imageModel = new ZhiPuAiImageModel( + new ZhiPuAiImageApi("78d3228c1d9e5e342a3e1ab349e2dd7b.VXLoq5vrwK2ofboy") // 密钥 + ); @Test @Disabled