Merge branch 'release' into staging

ce2fd8800dfdeae64d6488f09786de82597605d6

Cohee <18619528+Cohee1207@users.noreply.github.com>

2 files changed, +9 -9Ignore whitespace
.github/readme.md+1 -1
@@ -203,7 +203,7 @@ You will need two mandatory directory mappings and a port mapping to allow Silly
203203
204##### Additional Settings204##### Additional Settings
205205
206* `SILLYTAVERN_VERSION` - On the right-hand side of this GitHub page, you'll see "Packages". Select the "sillytavern" package and you'll see the image versions. The image tag "latest" will keep you up-to-date with the current release. You can also utilize "staging" that points to the nightly image the respective branch.206* `SILLYTAVERN_VERSION` - On the right-hand side of this GitHub page, you'll see "Packages". Select the "sillytavern" package and you'll see the image versions. The image tag "latest" will keep you up-to-date with the current release. You can also utilize "staging" that points to the nightly image of the respective branch.
207207
208#### Running the container208#### Running the container
209209
public/scripts/textgen-models.js+8 -8
@@ -130,11 +130,11 @@ export async function loadTogetherAIModels(data) {
130 return;130 return;
131 }131 }
132132
133 data.sort((a, b) => a.name.localeCompare(b.name));133 data.sort((a, b) => a.id.localeCompare(b.id));
134 togetherModels = data;134 togetherModels = data;
135135
136 if (!data.find(x => x.name === textgen_settings.togetherai_model)) {136 if (!data.find(x => x.id === textgen_settings.togetherai_model)) {
137 textgen_settings.togetherai_model = data[0]?.name || '';137 textgen_settings.togetherai_model = data[0]?.id || '';
138 }138 }
139139
140 $('#model_togetherai_select').empty();140 $('#model_togetherai_select').empty();
@@ -145,9 +145,9 @@ export async function loadTogetherAIModels(data) {
145 }145 }
146146
147 const option = document.createElement('option');147 const option = document.createElement('option');
148 option.value = model.name;148 option.value = model.id;
149 option.text = model.display_name;149 option.text = model.display_name;
150 option.selected = model.name === textgen_settings.togetherai_model;150 option.selected = model.id === textgen_settings.togetherai_model;
151 $('#model_togetherai_select').append(option);151 $('#model_togetherai_select').append(option);
152 }152 }
153}153}
@@ -592,7 +592,7 @@ function onTogetherModelSelect() {
592 const modelName = String($('#model_togetherai_select').val());592 const modelName = String($('#model_togetherai_select').val());
593 textgen_settings.togetherai_model = modelName;593 textgen_settings.togetherai_model = modelName;
594 $('#api_button_textgenerationwebui').trigger('click');594 $('#api_button_textgenerationwebui').trigger('click');
595 const model = togetherModels.find(x => x.name === modelName);595 const model = togetherModels.find(x => x.id === modelName);
596 setGenerationParamsFromPreset({ max_length: model.context_length });596 setGenerationParamsFromPreset({ max_length: model.context_length });
597}597}
598598
@@ -662,7 +662,7 @@ function getMancerModelTemplate(option) {
662}662}
663663
664function getTogetherModelTemplate(option) {664function getTogetherModelTemplate(option) {
665 const model = togetherModels.find(x => x.name === option?.element?.value);665 const model = togetherModels.find(x => x.id === option?.element?.value);
666666
667 if (!option.id || !model) {667 if (!option.id || !model) {
668 return option.text;668 return option.text;
@@ -670,7 +670,7 @@ function getTogetherModelTemplate(option) {
670670
671 return $((`671 return $((`
672 <div class="flex-container flexFlowColumn">672 <div class="flex-container flexFlowColumn">
673 <div><strong>${DOMPurify.sanitize(model.name)}</strong> | <span>${model.context_length || '???'} tokens</span></div>673 <div><strong>${DOMPurify.sanitize(model.id)}</strong> | <span>${model.context_length || '???'} tokens</span></div>
674 <div><small>${DOMPurify.sanitize(model.description)}</small></div>674 <div><small>${DOMPurify.sanitize(model.description)}</small></div>
675 </div>675 </div>
676 `));676 `));