Add more scratchpad stuff

This commit is contained in:
somebody
2022-09-25 22:08:38 -05:00
parent 9651f3b327
commit 2af4d94ea7
4 changed files with 122 additions and 9 deletions

View File

@@ -8383,6 +8383,18 @@ def UI_2_update_wi_keys(data):
# Send to UI
socketio.emit("world_info_entry", koboldai_vars.worldinfo_v2.world_info[uid], broadcast=True, room="UI_2")
@socketio.on("scratchpad_prompt")
@logger.catch
def UI_2_scratchpad_prompt(data):
print(data)
out_text = raw_generate(
data,
max_new=80,
).decoded
print("data", data, "out", out_text)
socketio.emit("scratchpad_response", out_text, broadcast=True, room="UI_2")
#==================================================================#
# Event triggered when user edits phrase biases