Dynamically hide incompatible chat completion elements depending on selected API

This commit is contained in:
SillyLossy
2023-06-08 13:38:04 +03:00
parent 6ac4e2db0b
commit 62674707eb
2 changed files with 10 additions and 5 deletions

View File

@ -1532,6 +1532,11 @@ function toggleChatCompletionForms() {
} else {
$('#model_openai_select').trigger('change');
}
$('[data-source]').each(function () {
const validSources = $(this).data('source').split(',');
$(this).toggle(validSources.includes(oai_settings.chat_completion_source));
});
}
$(document).ready(function () {