From 7e60eca86e2485b732d31482aff76f7ebbe947d1 Mon Sep 17 00:00:00 2001 From: IDJack <798979047@qq.com> Date: Sat, 6 May 2023 17:53:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96OpenAIClient=E7=B1=BB?= =?UTF-8?q?=E4=BB=A3=E7=A0=81=EF=BC=8C=E5=8F=8C=E6=A3=80=E9=94=81=E5=8D=95?= =?UTF-8?q?=E4=BE=8B=E5=8A=A0volatile=E4=BF=AE=E9=A5=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/alibaba/dbhub/server/web/api/util/OpenAIClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ali-dbhub-server/ali-dbhub-server-web/ali-dbhub-server-web-api/src/main/java/com/alibaba/dbhub/server/web/api/util/OpenAIClient.java b/ali-dbhub-server/ali-dbhub-server-web/ali-dbhub-server-web-api/src/main/java/com/alibaba/dbhub/server/web/api/util/OpenAIClient.java index f9917afc5..5167ab6df 100644 --- a/ali-dbhub-server/ali-dbhub-server-web/ali-dbhub-server-web-api/src/main/java/com/alibaba/dbhub/server/web/api/util/OpenAIClient.java +++ b/ali-dbhub-server/ali-dbhub-server-web/ali-dbhub-server-web-api/src/main/java/com/alibaba/dbhub/server/web/api/util/OpenAIClient.java @@ -21,7 +21,7 @@ public class OpenAIClient { public static final String OPENAI_KEY = "chatgpt.apiKey"; - private static OpenAiStreamClient OPEN_AI_STREAM_CLIENT; + private static volatile OpenAiStreamClient OPEN_AI_STREAM_CLIENT; private static String apiKey; public static OpenAiStreamClient getInstance() {