mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Handle unknown chat completion sources gracefully by logging an error and returning an empty string
This commit is contained in:
@ -1661,7 +1661,8 @@ export function getChatCompletionModel(source = null) {
|
||||
case chat_completion_sources.XAI:
|
||||
return oai_settings.xai_model;
|
||||
default:
|
||||
throw new Error(`Unknown chat completion source: ${activeSource}`);
|
||||
console.error(`Unknown chat completion source: ${activeSource}`);
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user