Merge branch 'release' into staging
| @@ -203,7 +203,7 @@ You will need two mandatory directory mappings and a port mapping to allow Silly | |||
| 203 | 203 | ||
| 204 | ##### Additional Settings | 204 | ##### Additional Settings |
| 205 | 205 | ||
| 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. |
| 207 | 207 | ||
| 208 | #### Running the container | 208 | #### Running the container |
| 209 | 209 | ||
| @@ -130,11 +130,11 @@ export async function loadTogetherAIModels(data) { | |||
| 130 | return; | 130 | return; |
| 131 | } | 131 | } |
| 132 | 132 | ||
| 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; |
| 135 | 135 | ||
| 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 | } |
| 139 | 139 | ||
| 140 | $('#model_togetherai_select').empty(); | 140 | $('#model_togetherai_select').empty(); |
| @@ -145,9 +145,9 @@ export async function loadTogetherAIModels(data) { | |||
| 145 | } | 145 | } |
| 146 | 146 | ||
| 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 | } |
| 598 | 598 | ||
| @@ -662,7 +662,7 @@ function getMancerModelTemplate(option) { | |||
| 662 | } | 662 | } |
| 663 | 663 | ||
| 664 | function getTogetherModelTemplate(option) { | 664 | function getTogetherModelTemplate(option) { |
| 665 | const model = togetherModels.find(x => x.name === option?.element?.value); | 665 | const model = togetherModels.find(x => x.id === option?.element?.value); |
| 666 | 666 | ||
| 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) { | |||
| 670 | 670 | ||
| 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 | `)); |