diff --git a/.github/readme.md b/.github/readme.md index 808b76bd0..fc8cef288 100644 --- a/.github/readme.md +++ b/.github/readme.md @@ -203,7 +203,7 @@ You will need two mandatory directory mappings and a port mapping to allow Silly ##### 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 diff --git a/public/scripts/textgen-models.js b/public/scripts/textgen-models.js index 7ad2ae20d..fd70ffa6f 100644 --- a/public/scripts/textgen-models.js +++ b/public/scripts/textgen-models.js @@ -130,11 +130,11 @@ export async function loadTogetherAIModels(data) { return; } - data.sort((a, b) => a.name.localeCompare(b.name)); + data.sort((a, b) => a.id.localeCompare(b.id)); togetherModels = data; - if (!data.find(x => x.name === textgen_settings.togetherai_model)) { - textgen_settings.togetherai_model = data[0]?.name || ''; + if (!data.find(x => x.id === textgen_settings.togetherai_model)) { + textgen_settings.togetherai_model = data[0]?.id || ''; } $('#model_togetherai_select').empty(); @@ -145,9 +145,9 @@ export async function loadTogetherAIModels(data) { } const option = document.createElement('option'); - option.value = model.name; + option.value = model.id; 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); } } @@ -592,7 +592,7 @@ function onTogetherModelSelect() { const modelName = String($('#model_togetherai_select').val()); textgen_settings.togetherai_model = modelName; $('#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 }); } @@ -662,7 +662,7 @@ function getMancerModelTemplate(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) { return option.text; @@ -670,7 +670,7 @@ function getTogetherModelTemplate(option) { return $((`