Merge pull request #337 from devchat-ai/fix_base_url_error

fix base url error
This commit is contained in:
boob.yang 2023-11-03 15:41:00 +08:00 committed by GitHub
commit 6e6cb32b89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -146,6 +146,11 @@ export class ApiKeyManager {
}
if (apiBase) {
modelProperties["api_base"] = apiBase;
} else if (!apiKey) {
const devchatApiBase = await this.getProviderApiBase("devchat");
if (devchatApiBase) {
modelProperties["api_base"] = devchatApiBase;
}
}
if (!modelProperties["api_base"] && modelProperties["api_key"]?.startsWith("DC.")) {