mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
top_k and tfs support by Frogging101
Adds top_k and tfs support, also fixes a SocketIO error.
This commit is contained in:
@ -706,8 +706,7 @@ $(document).ready(function(){
|
||||
seqselcontents = $("#seqselcontents");
|
||||
|
||||
// Connect to SocketIO server
|
||||
loc = window.document.location;
|
||||
socket = io.connect(loc.href);
|
||||
socket = io.connect(window.document.origin);
|
||||
|
||||
socket.on('from_server', function(msg) {
|
||||
if(msg.cmd == "connected") {
|
||||
@ -779,6 +778,14 @@ $(document).ready(function(){
|
||||
// Send current top p value to input
|
||||
$("#settopp").val(parseFloat(msg.data));
|
||||
$("#settoppcur").html(msg.data);
|
||||
} else if(msg.cmd == "updatetopk") {
|
||||
// Send current top k value to input
|
||||
$("#settopk").val(parseFloat(msg.data));
|
||||
$("#settopkcur").html(msg.data);
|
||||
} else if(msg.cmd == "updatetfs") {
|
||||
// Send current tfs value to input
|
||||
$("#settfs").val(parseFloat(msg.data));
|
||||
$("#settfscur").html(msg.data);
|
||||
} else if(msg.cmd == "updatereppen") {
|
||||
// Send current rep pen value to input
|
||||
$("#setreppen").val(parseFloat(msg.data));
|
||||
@ -801,6 +808,12 @@ $(document).ready(function(){
|
||||
} else if(msg.cmd == "setlabeltopp") {
|
||||
// Update setting label with value from server
|
||||
$("#settoppcur").html(msg.data);
|
||||
} else if(msg.cmd == "setlabeltopk") {
|
||||
// Update setting label with value from server
|
||||
$("#settopkcur").html(msg.data);
|
||||
} else if(msg.cmd == "setlabeltfs") {
|
||||
// Update setting label with value from server
|
||||
$("#settfscur").html(msg.data);
|
||||
} else if(msg.cmd == "setlabelreppen") {
|
||||
// Update setting label with value from server
|
||||
$("#setreppencur").html(msg.data);
|
||||
|
Reference in New Issue
Block a user