From bad7644405c4b4ed0afb1d931eccf7f919349bba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E5=82=85=E5=93=A5?= <184172133@qq.com> Date: Thu, 16 Nov 2023 21:39:19 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9Achatglm=5Fturbo=20=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/cn/bugstack/chatglm/model/Model.java | 3 +++ src/test/java/cn/bugstack/chatglm/test/ApiTest.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/cn/bugstack/chatglm/model/Model.java b/src/main/java/cn/bugstack/chatglm/model/Model.java index 5dc351f..ce18dac 100644 --- a/src/main/java/cn/bugstack/chatglm/model/Model.java +++ b/src/main/java/cn/bugstack/chatglm/model/Model.java @@ -13,11 +13,14 @@ import lombok.Getter; @AllArgsConstructor public enum Model { + @Deprecated CHATGLM_6B_SSE("chatGLM_6b_SSE", "ChatGLM-6B 测试模型"), CHATGLM_LITE("chatglm_lite", "轻量版模型,适用对推理速度和成本敏感的场景"), CHATGLM_LITE_32K("chatglm_lite_32k", "标准版模型,适用兼顾效果和成本的场景"), CHATGLM_STD("chatglm_std", "适用于对知识量、推理能力、创造力要求较高的场景"), CHATGLM_PRO("chatglm_pro", "适用于对知识量、推理能力、创造力要求较高的场景"), + /** 智谱AI最新模型 */ + CHATGLM_TURBO("chatglm_turbo", "适用于对知识量、推理能力、创造力要求较高的场景"), ; private final String code; diff --git a/src/test/java/cn/bugstack/chatglm/test/ApiTest.java b/src/test/java/cn/bugstack/chatglm/test/ApiTest.java index 1d996a1..0070843 100644 --- a/src/test/java/cn/bugstack/chatglm/test/ApiTest.java +++ b/src/test/java/cn/bugstack/chatglm/test/ApiTest.java @@ -51,7 +51,7 @@ public class ApiTest { public void test_completions() throws JsonProcessingException, InterruptedException { // 入参;模型、请求信息 ChatCompletionRequest request = new ChatCompletionRequest(); - request.setModel(Model.CHATGLM_LITE); // chatGLM_6b_SSE、chatglm_lite、chatglm_lite_32k、chatglm_std、chatglm_pro + request.setModel(Model.CHATGLM_TURBO); // chatGLM_6b_SSE、chatglm_lite、chatglm_lite_32k、chatglm_std、chatglm_pro request.setIncremental(false); request.setPrompt(new ArrayList() { private static final long serialVersionUID = -7988151926241837899L; -- GitLab