mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Placeholders for import/export chat completion preset
This commit is contained in:
@@ -144,7 +144,10 @@
|
|||||||
</select>
|
</select>
|
||||||
<i id="update_oai_preset" class="menu_button fa-solid fa-save" title="Update current preset"></i>
|
<i id="update_oai_preset" class="menu_button fa-solid fa-save" title="Update current preset"></i>
|
||||||
<i id="new_oai_preset" class="menu_button fa-solid fa-plus" title="Create new preset"></i>
|
<i id="new_oai_preset" class="menu_button fa-solid fa-plus" title="Create new preset"></i>
|
||||||
|
<i title="Import preset" id="import_oai_preset" class="displayNone menu_button fa-solid fa-upload"></i>
|
||||||
|
<i title="Export preset" id="export_oai_preset" class="displayNone menu_button fa-solid fa-download"></i>
|
||||||
<i id="delete_oai_preset" class="menu_button fa-solid fa-trash-can" title="Delete the preset"></i>
|
<i id="delete_oai_preset" class="menu_button fa-solid fa-trash-can" title="Delete the preset"></i>
|
||||||
|
<input id="openai_preset_import_file" type="file" accept=".json,.settings" hidden />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1309,8 +1309,12 @@ function addLogitBiasPresetOption(name) {
|
|||||||
$('#openai_logit_bias_preset').trigger('change');
|
$('#openai_logit_bias_preset').trigger('change');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onImportPresetClick() {
|
||||||
|
$('#openai_preset_import_file').trigger('click');
|
||||||
|
}
|
||||||
|
|
||||||
function onLogitBiasPresetImportClick() {
|
function onLogitBiasPresetImportClick() {
|
||||||
$('#openai_logit_bias_import_file').click();
|
$('#openai_logit_bias_import_file').trigger('click');
|
||||||
}
|
}
|
||||||
|
|
||||||
async function onLogitBiasPresetImportFileChange(e) {
|
async function onLogitBiasPresetImportFileChange(e) {
|
||||||
@@ -1886,4 +1890,5 @@ $(document).ready(function () {
|
|||||||
$("#openai_logit_bias_import_preset").on("click", onLogitBiasPresetImportClick);
|
$("#openai_logit_bias_import_preset").on("click", onLogitBiasPresetImportClick);
|
||||||
$("#openai_logit_bias_export_preset").on("click", onLogitBiasPresetExportClick);
|
$("#openai_logit_bias_export_preset").on("click", onLogitBiasPresetExportClick);
|
||||||
$("#openai_logit_bias_delete_preset").on("click", onLogitBiasPresetDeleteClick);
|
$("#openai_logit_bias_delete_preset").on("click", onLogitBiasPresetDeleteClick);
|
||||||
|
$("#import_oai_preset").on("click", onImportPresetClick);
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user