From 7de7b3d49516e28c6938c6cc4ab4688452abe940 Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Mon, 31 Jul 2023 10:46:02 -0700 Subject: [PATCH] Fix newlines in exported character yamls --- modules/chat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/chat.py b/modules/chat.py index 337dc7cd..070f45a4 100644 --- a/modules/chat.py +++ b/modules/chat.py @@ -598,7 +598,7 @@ def check_tavern_character(img): if "chara" not in img.info: return "Not a TavernAI card", None, None, gr.update(interactive=False) - decoded_string = base64.b64decode(img.info['chara']) + decoded_string = base64.b64decode(img.info['chara']).replace(b'\\r\\n', b'\\n') _json = json.loads(decoded_string) if "data" in _json: _json = _json["data"]