From 54452f51d8eba972c3170113439a261ae03e790e Mon Sep 17 00:00:00 2001 From: tmlx1990 Date: Sat, 11 Jan 2025 02:01:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89AI=E4=BF=9D=E5=AD=98=E5=90=8E=E5=86=8D=E6=AC=A1?= =?UTF-8?q?=E8=BF=9B=E5=85=A5=E6=B2=A1=E6=9C=89=E6=98=BE=E7=A4=BA=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../server/web/api/controller/config/ConfigController.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/chat2db-server/chat2db-server-web/chat2db-server-web-api/src/main/java/ai/chat2db/server/web/api/controller/config/ConfigController.java b/chat2db-server/chat2db-server-web/chat2db-server-web-api/src/main/java/ai/chat2db/server/web/api/controller/config/ConfigController.java index 92f5eb360..0ab1daad6 100644 --- a/chat2db-server/chat2db-server-web/chat2db-server-web-api/src/main/java/ai/chat2db/server/web/api/controller/config/ConfigController.java +++ b/chat2db-server/chat2db-server-web/chat2db-server-web-api/src/main/java/ai/chat2db/server/web/api/controller/config/ConfigController.java @@ -333,6 +333,13 @@ public DataResult getChatAiSystemConfig(String aiSqlSource) { config.setModel(Objects.nonNull(azureDeployId.getData()) ? azureDeployId.getData().getContent() : ""); break; case RESTAI: + DataResult restAIApiKey = configService.find(RestAIClient.REST_AI_API_KEY); + DataResult restAIApiHost = configService.find(RestAIClient.REST_AI_URL); + DataResult restAIModel = configService.find(RestAIClient.REST_AI_MODEL); + config.setApiKey(Objects.nonNull(restAIApiKey.getData()) ? restAIApiKey.getData().getContent() : ""); + config.setApiHost(Objects.nonNull(restAIApiHost.getData()) ? restAIApiHost.getData().getContent() : ""); + config.setModel(Objects.nonNull(restAIModel.getData()) ? restAIModel.getData().getContent() : ""); + break; case FASTCHATAI: DataResult fastChatApiKey = configService.find(FastChatAIClient.FASTCHAT_API_KEY); DataResult fastChatApiHost = configService.find(FastChatAIClient.FASTCHAT_HOST);