mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Decrease connection timeout, set 'valid' status on 'invalid URL', don't wait if not needed
Fixes #3683
This commit is contained in:
@ -3493,7 +3493,7 @@ async function getStatusOpen() {
|
||||
|
||||
if (oai_settings.chat_completion_source === chat_completion_sources.CUSTOM && !isValidUrl(oai_settings.custom_url)) {
|
||||
console.debug('Invalid endpoint URL of Custom OpenAI API:', oai_settings.custom_url);
|
||||
setOnlineStatus('no_connection');
|
||||
setOnlineStatus(t`Invalid endpoint URL. Requests may fail.`);
|
||||
return resultCheckStatus();
|
||||
}
|
||||
|
||||
@ -4757,11 +4757,6 @@ async function onConnectButtonClick(e) {
|
||||
if (api_key_custom.length) {
|
||||
await writeSecret(SECRET_KEYS.CUSTOM, api_key_custom);
|
||||
}
|
||||
|
||||
if (!oai_settings.custom_url) {
|
||||
console.log('No API URL saved for Custom');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (oai_settings.chat_completion_source == chat_completion_sources.COHERE) {
|
||||
|
Reference in New Issue
Block a user