mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-02-09 00:08:53 +01:00
Fix for green opening text showing OAI and/or OAI/GooseAI model name rather than the appropriate name.
This commit is contained in:
parent
1df88e1696
commit
6fd2496d94
@ -1125,9 +1125,10 @@ def load_model(use_gpu=True, gpu_layers=None, initial_load=False, online_model="
|
|||||||
if(vars.model == "GooseAI"):
|
if(vars.model == "GooseAI"):
|
||||||
vars.oaiengines = "https://api.goose.ai/v1/engines"
|
vars.oaiengines = "https://api.goose.ai/v1/engines"
|
||||||
vars.model = "OAI"
|
vars.model = "OAI"
|
||||||
args.configname = "GooseAI"
|
args.configname = "GooseAI" + "/" + online_model
|
||||||
|
else:
|
||||||
|
args.configname = vars.model + "/" + online_model
|
||||||
vars.oaiurl = vars.oaiengines + "/{0}/completions".format(online_model)
|
vars.oaiurl = vars.oaiengines + "/{0}/completions".format(online_model)
|
||||||
args.configname = vars.model + "/" + online_model
|
|
||||||
|
|
||||||
# If transformers model was selected & GPU available, ask to use CPU or GPU
|
# If transformers model was selected & GPU available, ask to use CPU or GPU
|
||||||
if(vars.model not in ["InferKit", "Colab", "OAI", "GooseAI" , "ReadOnly", "TPUMeshTransformerGPTJ", "TPUMeshTransformerGPTNeoX"]):
|
if(vars.model not in ["InferKit", "Colab", "OAI", "GooseAI" , "ReadOnly", "TPUMeshTransformerGPTJ", "TPUMeshTransformerGPTNeoX"]):
|
||||||
@ -1926,6 +1927,9 @@ def load_model(use_gpu=True, gpu_layers=None, initial_load=False, online_model="
|
|||||||
set_aibusy(False)
|
set_aibusy(False)
|
||||||
emit('from_server', {'cmd': 'hide_model_name'}, broadcast=True)
|
emit('from_server', {'cmd': 'hide_model_name'}, broadcast=True)
|
||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
|
|
||||||
|
if not vars.gamestarted:
|
||||||
|
setStartState()
|
||||||
|
|
||||||
|
|
||||||
# Set up Flask routes
|
# Set up Flask routes
|
||||||
|
@ -2480,11 +2480,13 @@ $(document).ready(function(){
|
|||||||
} else if(msg.cmd == 'selected_model_info') {
|
} else if(msg.cmd == 'selected_model_info') {
|
||||||
enableButtons([load_model_accept]);
|
enableButtons([load_model_accept]);
|
||||||
$("#oaimodel").addClass("hidden")
|
$("#oaimodel").addClass("hidden")
|
||||||
|
$("#oaimodel")[0].options[0].selected = true;
|
||||||
if (msg.key) {
|
if (msg.key) {
|
||||||
$("#modelkey").removeClass("hidden");
|
$("#modelkey").removeClass("hidden");
|
||||||
$("#modelkey")[0].value = msg.key_value;
|
$("#modelkey")[0].value = msg.key_value;
|
||||||
} else {
|
} else {
|
||||||
$("#modelkey").addClass("hidden");
|
$("#modelkey").addClass("hidden");
|
||||||
|
|
||||||
}
|
}
|
||||||
if (msg.url) {
|
if (msg.url) {
|
||||||
$("#modelurl").removeClass("hidden");
|
$("#modelurl").removeClass("hidden");
|
||||||
@ -2513,6 +2515,10 @@ $(document).ready(function(){
|
|||||||
} else if(msg.cmd == 'oai_engines') {
|
} else if(msg.cmd == 'oai_engines') {
|
||||||
$("#oaimodel").removeClass("hidden")
|
$("#oaimodel").removeClass("hidden")
|
||||||
selected_item = 0;
|
selected_item = 0;
|
||||||
|
length = $("#oaimodel")[0].options.length;
|
||||||
|
for (let i = 0; i < length; i++) {
|
||||||
|
$("#oaimodel")[0].options.remove(1);
|
||||||
|
}
|
||||||
msg.data.forEach(function (item, index) {
|
msg.data.forEach(function (item, index) {
|
||||||
var option = document.createElement("option");
|
var option = document.createElement("option");
|
||||||
option.value = item[0];
|
option.value = item[0];
|
||||||
|
@ -289,7 +289,7 @@
|
|||||||
<input class="form-control hidden" type="text" placeholder="Enter the URL of the server (For example a trycloudflare link)" id="modelurl" onchange="check_enable_model_load()">
|
<input class="form-control hidden" type="text" placeholder="Enter the URL of the server (For example a trycloudflare link)" id="modelurl" onchange="check_enable_model_load()">
|
||||||
</div>
|
</div>
|
||||||
<div class="popupfooter">
|
<div class="popupfooter">
|
||||||
<select class="form-control hidden" id="oaimodel"><option value="Select OAI Model">Select OAI Model</option></select>
|
<select class="form-control hidden" id="oaimodel"><option value="">Select OAI Model</option></select>
|
||||||
</div>
|
</div>
|
||||||
<div class="popupfooter hidden" id=modellayers>
|
<div class="popupfooter hidden" id=modellayers>
|
||||||
<div class='settingitem' style="width:100%">
|
<div class='settingitem' style="width:100%">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user