Skip to content

Commit

Permalink
Merge pull request #1626 from tmlx1990/fixAI
Browse files Browse the repository at this point in the history
fix: 修复自定义AI保存后再次进入没有显示的问题。
  • Loading branch information
Chat2DB-Pro authored Jan 14, 2025
2 parents aff2564 + 54452f5 commit 698323a
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,13 @@ public DataResult<AIConfig> getChatAiSystemConfig(String aiSqlSource) {
config.setModel(Objects.nonNull(azureDeployId.getData()) ? azureDeployId.getData().getContent() : "");
break;
case RESTAI:
DataResult<Config> restAIApiKey = configService.find(RestAIClient.REST_AI_API_KEY);
DataResult<Config> restAIApiHost = configService.find(RestAIClient.REST_AI_URL);
DataResult<Config> 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<Config> fastChatApiKey = configService.find(FastChatAIClient.FASTCHAT_API_KEY);
DataResult<Config> fastChatApiHost = configService.find(FastChatAIClient.FASTCHAT_HOST);
Expand Down

0 comments on commit 698323a

Please sign in to comment.