Fix - Check for samplers in the connections pannel (#4822)

84a1403ce0ef7101e5097603e0e671871156cdc4

Leandro Jofré <leandrotomasjofre@gmail.com>

Signed
2 files changed, +3 -3Ignore whitespace
public/index.html+1 -1
@@ -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>
public/scripts/textgen-settings.js+2 -2
@@ -1080,7 +1080,7 @@ export function initTextGenSettings() {
1080 * @returns void1080 * @returns void
1081 */1081 */
1082function showSamplerControls(apiType = null) {1082function 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;
10851085
1086 if (!typeSpecificControlled) $(this).show();1086 if (!typeSpecificControlled) $(this).show();
@@ -1093,7 +1093,7 @@ function showSamplerControls(apiType = null) {
10931093
1094 if (!samplersActivatedManually?.length || !prioritizeManualSamplerSelect) return;1094 if (!samplersActivatedManually?.length || !prioritizeManualSamplerSelect) return;
10951095
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 !== '');
10981098
1099 for (const tgSampler of tgSamplers) {1099 for (const tgSampler of tgSamplers) {