From 6415422f7dfb823fe0c5c5bf494dde1d78062f72 Mon Sep 17 00:00:00 2001 From: cherishsince Date: Sat, 16 Mar 2024 19:47:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20client=20=E6=9E=84?= =?UTF-8?q?=E9=80=A0=E6=96=B9=E6=B3=95=EF=BC=8C=E5=88=B6=E5=AE=9A=E4=BC=A0?= =?UTF-8?q?=E5=85=A5=20QianWenOptions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../framework/ai/chatqianwen/QianWenChatClient.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java index 4be2bf03e..52b2c7b79 100644 --- a/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java +++ b/yudao-module-ai/yudao-spring-boot-starter-ai/src/main/java/cn/iocoder/yudao/framework/ai/chatqianwen/QianWenChatClient.java @@ -34,15 +34,15 @@ public class QianWenChatClient implements ChatClient, StreamingChatClient { private QianWenApi qianWenApi; - private ChatOptions chatOptions; + private QianWenOptions qianWenOptions; public QianWenChatClient(QianWenApi qianWenApi) { this.qianWenApi = qianWenApi; } - public QianWenChatClient(QianWenApi qianWenApi, ChatOptions chatOptions) { + public QianWenChatClient(QianWenApi qianWenApi, QianWenOptions qianWenOptions) { this.qianWenApi = qianWenApi; - this.chatOptions = chatOptions; + this.qianWenOptions = qianWenOptions; } public final RetryTemplate retryTemplate = RetryTemplate.builder() @@ -81,11 +81,11 @@ public class QianWenChatClient implements ChatClient, StreamingChatClient { private CompletionsRequest createRequest(Prompt prompt, boolean stream) { // 两个都为null 则没有配置文件 - if (chatOptions == null && prompt.getOptions() == null) { + if (qianWenOptions == null && prompt.getOptions() == null) { throw new ChatException("ChatOptions 未配置参数!"); } // 优先使用 Prompt 里面的 ChatOptions - ChatOptions options = chatOptions; + ChatOptions options = qianWenOptions; if (prompt.getOptions() != null) { options = (ChatOptions) prompt.getOptions(); }