From a2affabbdd221e79614c58f9708ffd0580e711ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=82=85=E5=93=A5?= <184172133@qq.com> Date: Wed, 29 Nov 2023 21:12:15 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E6=B7=BB=E5=8A=A0=20@Deprecated?= =?UTF-8?q?=20=E6=B3=A8=E8=A7=A3=EF=BC=8C=E9=83=A8=E5=88=86=E6=A8=A1?= =?UTF-8?q?=E5=9E=8B11.30=E4=B8=8B=E7=BA=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cn/bugstack/chatglm/model/Model.java | 4 ++++ src/test/java/cn/bugstack/chatglm/test/ApiTest.java | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/main/java/cn/bugstack/chatglm/model/Model.java b/src/main/java/cn/bugstack/chatglm/model/Model.java index ce18dac..d10bf01 100644 --- a/src/main/java/cn/bugstack/chatglm/model/Model.java +++ b/src/main/java/cn/bugstack/chatglm/model/Model.java @@ -15,9 +15,13 @@ public enum Model { @Deprecated CHATGLM_6B_SSE("chatGLM_6b_SSE", "ChatGLM-6B 测试模型"), + @Deprecated CHATGLM_LITE("chatglm_lite", "轻量版模型,适用对推理速度和成本敏感的场景"), + @Deprecated CHATGLM_LITE_32K("chatglm_lite_32k", "标准版模型,适用兼顾效果和成本的场景"), + @Deprecated CHATGLM_STD("chatglm_std", "适用于对知识量、推理能力、创造力要求较高的场景"), + @Deprecated CHATGLM_PRO("chatglm_pro", "适用于对知识量、推理能力、创造力要求较高的场景"), /** 智谱AI最新模型 */ CHATGLM_TURBO("chatglm_turbo", "适用于对知识量、推理能力、创造力要求较高的场景"), diff --git a/src/test/java/cn/bugstack/chatglm/test/ApiTest.java b/src/test/java/cn/bugstack/chatglm/test/ApiTest.java index 0070843..13da146 100644 --- a/src/test/java/cn/bugstack/chatglm/test/ApiTest.java +++ b/src/test/java/cn/bugstack/chatglm/test/ApiTest.java @@ -9,6 +9,7 @@ import cn.bugstack.chatglm.utils.BearerTokenUtils; import com.alibaba.fastjson.JSON; import com.fasterxml.jackson.core.JsonProcessingException; import lombok.extern.slf4j.Slf4j; +import okhttp3.logging.HttpLoggingInterceptor; import okhttp3.sse.EventSource; import okhttp3.sse.EventSourceListener; import org.apache.commons.lang3.StringUtils; @@ -38,6 +39,7 @@ public class ApiTest { Configuration configuration = new Configuration(); configuration.setApiHost("https://open.bigmodel.cn/"); configuration.setApiSecretKey("d570f7c5d289cdac2abdfdc562e39f3f.trqz1dH8ZK6ED7Pg"); + configuration.setLevel(HttpLoggingInterceptor.Level.BODY); // 2. 会话工厂 OpenAiSessionFactory factory = new DefaultOpenAiSessionFactory(configuration); // 3. 开启会话 -- GitLab