【代码优化】AI:适配 Spring AI 1.0.6 对 ZhiPu 的兼容
This commit is contained in:
parent
c96d966a41
commit
430dc99d12
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue