mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix horde for GUI preset mode
This commit is contained in:
@@ -7,6 +7,7 @@ export {
|
||||
checkHordeStatus,
|
||||
loadHordeSettings,
|
||||
adjustHordeGenerationParams,
|
||||
getHordeModels,
|
||||
}
|
||||
|
||||
let models = [];
|
||||
@@ -154,6 +155,16 @@ async function getHordeModels() {
|
||||
option.selected = horde_settings.model === model.name;
|
||||
$('#horde_model').append(option);
|
||||
}
|
||||
|
||||
// if previously selected is no longer available
|
||||
if (horde_settings.model && !models.find(m => m.name == horde_settings.model)) {
|
||||
horde_settings.model = null;
|
||||
}
|
||||
|
||||
// if no models preselected - select a first one in dropdown
|
||||
if (!horde_settings.model) {
|
||||
horde_settings.model = $('#horde_model').find(":selected").val();
|
||||
}
|
||||
}
|
||||
|
||||
function loadHordeSettings(settings) {
|
||||
@@ -182,9 +193,6 @@ $(document).ready(function () {
|
||||
// Trigger status check
|
||||
changeMainAPI();
|
||||
saveSettingsDebounced();
|
||||
if (main_api === 'kobold' && horde_settings.use_horde) {
|
||||
await getHordeModels();
|
||||
}
|
||||
});
|
||||
|
||||
$("#horde_model").on("change", function () {
|
||||
|
Reference in New Issue
Block a user