From 5f0038cdc9b45d7473325abade86797e1ded7dca Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Thu, 2 Apr 2026 21:39:24 +0800 Subject: [PATCH] this section wasnt needed for qwen3.5 jinja and actually breaks. --- koboldcpp.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/koboldcpp.py b/koboldcpp.py index 21a60d58f..42e734c54 100755 --- a/koboldcpp.py +++ b/koboldcpp.py @@ -3078,12 +3078,12 @@ def format_jinja(messages_orig, tools, chat_template_kwargs=None): func["arguments"] = json.loads(args) except Exception: pass - # Fix tool content - if m.get("role") == "tool" and isinstance(m.get("content"), str): - try: - m["content"] = json.loads(m["content"]) - except Exception: - pass + # Fix tool content for some templates + # if m.get("role") == "tool" and isinstance(m.get("content"), str): + # try: + # m["content"] = json.loads(m["content"]) + # except Exception: + # pass jinja_env.globals['strftime_now'] = strftime_now jinja_env.globals['raise_exception'] = raise_exception jinja_env.filters["tojson"] = tojson