From c2f0285b72ccc592a4d6dc1e6875ea52b31129a1 Mon Sep 17 00:00:00 2001 From: mylxsw Date: Sat, 7 Oct 2023 17:51:57 +0800 Subject: [PATCH] bugfix for custom api server --- lib/repo/openai_repo.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/repo/openai_repo.dart b/lib/repo/openai_repo.dart index 148069f2..0b59bad5 100644 --- a/lib/repo/openai_repo.dart +++ b/lib/repo/openai_repo.dart @@ -38,7 +38,7 @@ class OpenAIRepository { } else { // 使用公共服务器 OpenAI.apiKey = settings.getDefault(settingAPIServerToken, ''); - OpenAI.baseUrl = apiServerURL; + OpenAI.baseUrl = settings.getDefault(settingServerURL, apiServerURL); OpenAI.organization = ""; OpenAI.externalHeaders = { 'X-CLIENT-VERSION': clientVersion,