Add model loading on url or key change for CLUSTER mode

This commit is contained in:
ebolam 2022-08-31 11:48:38 -04:00
parent 6258963e39
commit bf814ad407
1 changed files with 2 additions and 0 deletions

View File

@ -2920,8 +2920,10 @@ $(document).ready(function(){
$("#modelkey")[0].value = msg.key_value;
if (msg.models_on_url) {
$("#modelkey")[0].onblur = function () {socket.send({'cmd': 'Cluster_Key_Update', 'key': this.value, 'url': document.getElementById("modelurl").value});};
$("#modelurl")[0].onblur = function () {socket.send({'cmd': 'Cluster_Key_Update', 'key': document.getElementById("modelkey").value, 'url': this.value});};
} else {
$("#modelkey")[0].onblur = function () {socket.send({'cmd': 'OAI_Key_Update', 'key': $('#modelkey')[0].value});};
$("#modelurl")[0].onblur = null;
}
//if we're in the API list, disable to load button until the model is selected (after the API Key is entered)
disableButtons([load_model_accept]);