Fix - Check for samplers in the connections pannel (#4822)
Signed| @@ -2395,7 +2395,7 @@ | |||
| 2395 | <h4 data-i18n="Model Providers">Model Providers</h4> | 2395 | <h4 data-i18n="Model Providers">Model Providers</h4> |
| 2396 | <select id="openrouter_providers_text" class="openrouter_providers" multiple> | 2396 | <select id="openrouter_providers_text" class="openrouter_providers" multiple> |
| 2397 | </select> | 2397 | </select> |
| 2398 | <label class="checkbox_label" data-i18n="[title]Automatically chooses an alternative provider if chosen providers can't serve your request." for="openrouter_allow_fallbacks_textgenerationwebui" title="Automatically chooses an alternative provider if chosen providers can't serve your request."> | 2398 | <label class="checkbox_label" data-tg-samplers="openrouter_allow_fallbacks" data-i18n="[title]Automatically chooses an alternative provider if chosen providers can't serve your request." for="openrouter_allow_fallbacks_textgenerationwebui" title="Automatically chooses an alternative provider if chosen providers can't serve your request."> |
| 2399 | <input id="openrouter_allow_fallbacks_textgenerationwebui" type="checkbox" /> | 2399 | <input id="openrouter_allow_fallbacks_textgenerationwebui" type="checkbox" /> |
| 2400 | <span data-i18n="Allow fallback providers">Allow fallback providers</span> | 2400 | <span data-i18n="Allow fallback providers">Allow fallback providers</span> |
| 2401 | </label> | 2401 | </label> |
| @@ -1080,7 +1080,7 @@ export function initTextGenSettings() { | |||
| 1080 | * @returns void | 1080 | * @returns void |
| 1081 | */ | 1081 | */ |
| 1082 | function showSamplerControls(apiType = null) { | 1082 | function showSamplerControls(apiType = null) { |
| 1083 | $('#textgenerationwebui_api-settings [data-tg-samplers]').each(function(idx, elem) { | 1083 | $('#textgenerationwebui_api-settings [data-tg-samplers], #textgenerationwebui_api [data-tg-samplers]').each(function(idx, elem) { |
| 1084 | const typeSpecificControlled = $(elem).data('tg-type') !== undefined; | 1084 | const typeSpecificControlled = $(elem).data('tg-type') !== undefined; |
| 1085 | 1085 | ||
| 1086 | if (!typeSpecificControlled) $(this).show(); | 1086 | if (!typeSpecificControlled) $(this).show(); |
| @@ -1093,7 +1093,7 @@ function showSamplerControls(apiType = null) { | |||
| 1093 | 1093 | ||
| 1094 | if (!samplersActivatedManually?.length || !prioritizeManualSamplerSelect) return; | 1094 | if (!samplersActivatedManually?.length || !prioritizeManualSamplerSelect) return; |
| 1095 | 1095 | ||
| 1096 | $('#textgenerationwebui_api-settings [data-tg-samplers]').each(function() { | 1096 | $('#textgenerationwebui_api-settings [data-tg-samplers], #textgenerationwebui_api [data-tg-samplers]').each(function() { |
| 1097 | const tgSamplers = $(this).attr('data-tg-samplers').split(',').map(x => x.trim()).filter(str => str !== ''); | 1097 | const tgSamplers = $(this).attr('data-tg-samplers').split(',').map(x => x.trim()).filter(str => str !== ''); |
| 1098 | 1098 | ||
| 1099 | for (const tgSampler of tgSamplers) { | 1099 | for (const tgSampler of tgSamplers) { |