mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Add more scratchpad stuff
This commit is contained in:
12
aiserver.py
12
aiserver.py
@@ -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
|
||||
|
Reference in New Issue
Block a user