Merge branch 'release' into staging

This commit is contained in:
Cohee
2025-03-22 19:39:34 +02:00
2 changed files with 9 additions and 9 deletions

2
.github/readme.md vendored
View File

@@ -203,7 +203,7 @@ You will need two mandatory directory mappings and a port mapping to allow Silly
##### Additional Settings ##### Additional Settings
* `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. * `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.
#### Running the container #### Running the container

View File

@@ -130,11 +130,11 @@ export async function loadTogetherAIModels(data) {
return; return;
} }
data.sort((a, b) => a.name.localeCompare(b.name)); data.sort((a, b) => a.id.localeCompare(b.id));
togetherModels = data; togetherModels = data;
if (!data.find(x => x.name === textgen_settings.togetherai_model)) { if (!data.find(x => x.id === textgen_settings.togetherai_model)) {
textgen_settings.togetherai_model = data[0]?.name || ''; textgen_settings.togetherai_model = data[0]?.id || '';
} }
$('#model_togetherai_select').empty(); $('#model_togetherai_select').empty();
@@ -145,9 +145,9 @@ export async function loadTogetherAIModels(data) {
} }
const option = document.createElement('option'); const option = document.createElement('option');
option.value = model.name; option.value = model.id;
option.text = model.display_name; option.text = model.display_name;
option.selected = model.name === textgen_settings.togetherai_model; option.selected = model.id === textgen_settings.togetherai_model;
$('#model_togetherai_select').append(option); $('#model_togetherai_select').append(option);
} }
} }
@@ -592,7 +592,7 @@ function onTogetherModelSelect() {
const modelName = String($('#model_togetherai_select').val()); const modelName = String($('#model_togetherai_select').val());
textgen_settings.togetherai_model = modelName; textgen_settings.togetherai_model = modelName;
$('#api_button_textgenerationwebui').trigger('click'); $('#api_button_textgenerationwebui').trigger('click');
const model = togetherModels.find(x => x.name === modelName); const model = togetherModels.find(x => x.id === modelName);
setGenerationParamsFromPreset({ max_length: model.context_length }); setGenerationParamsFromPreset({ max_length: model.context_length });
} }
@@ -662,7 +662,7 @@ function getMancerModelTemplate(option) {
} }
function getTogetherModelTemplate(option) { function getTogetherModelTemplate(option) {
const model = togetherModels.find(x => x.name === option?.element?.value); const model = togetherModels.find(x => x.id === option?.element?.value);
if (!option.id || !model) { if (!option.id || !model) {
return option.text; return option.text;
@@ -670,7 +670,7 @@ function getTogetherModelTemplate(option) {
return $((` return $((`
<div class="flex-container flexFlowColumn"> <div class="flex-container flexFlowColumn">
<div><strong>${DOMPurify.sanitize(model.name)}</strong> | <span>${model.context_length || '???'} tokens</span></div> <div><strong>${DOMPurify.sanitize(model.id)}</strong> | <span>${model.context_length || '???'} tokens</span></div>
<div><small>${DOMPurify.sanitize(model.description)}</small></div> <div><small>${DOMPurify.sanitize(model.description)}</small></div>
</div> </div>
`)); `));