From fda152cef0727befb0dfb416949409b7053dfd69 Mon Sep 17 00:00:00 2001 From: Cohee Date: Tue, 20 Jun 2023 22:41:15 +0300 Subject: [PATCH] Placeholders for import/export chat completion preset --- public/index.html | 3 +++ public/scripts/openai.js | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index 8cc7aa3d2..efda17abe 100644 --- a/public/index.html +++ b/public/index.html @@ -144,7 +144,10 @@ + + + diff --git a/public/scripts/openai.js b/public/scripts/openai.js index f896294de..14e5822cf 100644 --- a/public/scripts/openai.js +++ b/public/scripts/openai.js @@ -1309,8 +1309,12 @@ function addLogitBiasPresetOption(name) { $('#openai_logit_bias_preset').trigger('change'); } +function onImportPresetClick() { + $('#openai_preset_import_file').trigger('click'); +} + function onLogitBiasPresetImportClick() { - $('#openai_logit_bias_import_file').click(); + $('#openai_logit_bias_import_file').trigger('click'); } async function onLogitBiasPresetImportFileChange(e) { @@ -1886,4 +1890,5 @@ $(document).ready(function () { $("#openai_logit_bias_import_preset").on("click", onLogitBiasPresetImportClick); $("#openai_logit_bias_export_preset").on("click", onLogitBiasPresetExportClick); $("#openai_logit_bias_delete_preset").on("click", onLogitBiasPresetDeleteClick); + $("#import_oai_preset").on("click", onImportPresetClick); });