From a421eb7fdf482bacef86ce8f3a5fe460e5ebf44c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mayoral=20Vilches?= Date: Wed, 21 May 2025 17:23:55 +0200 Subject: [PATCH] Fixup replay so that it doesn't crash if no content MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: VĂ­ctor Mayoral Vilches --- tools/replay.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/replay.py b/tools/replay.py index b681ca88..75d20746 100644 --- a/tools/replay.py +++ b/tools/replay.py @@ -154,7 +154,8 @@ def replay_conversation(messages: List[Dict], replay_delay: float = 0.5, usage: time.sleep(replay_delay) role = message.get("role", "") - content = message.get("content", "").strip() + content = message.get("content") + content = str(content).strip() if content is not None else "" sender = message.get("sender", role) model = message.get("model", file_model)