mirror of
https://github.com/KoboldAI/KoboldAI-Client.git
synced 2025-06-05 21:59:24 +02:00
Add ability to remove image from wi
This commit is contained in:
@@ -8823,7 +8823,14 @@ def UI_2_set_wi_image(uid):
|
||||
"",
|
||||
)
|
||||
|
||||
koboldai_vars.worldinfo_v2.image_store[str(uid)] = request.get_data(as_text=True)
|
||||
uid = str(uid)
|
||||
data = request.get_data(as_text=True)
|
||||
if not data and uid in koboldai_vars.worldinfo_v2.image_store:
|
||||
# Delete if sent null image
|
||||
del koboldai_vars.worldinfo_v2.image_store[uid]
|
||||
else:
|
||||
# Otherwise assign image
|
||||
koboldai_vars.worldinfo_v2.image_store[uid] = data
|
||||
return ":)"
|
||||
|
||||
@app.route("/get_wi_image/<int(signed=True):uid>", methods=["GET"])
|
||||
|
Reference in New Issue
Block a user