diff --git a/unsloth/chat_templates.py b/unsloth/chat_templates.py new file mode 100644 index 00000000..09c3f4cf --- /dev/null +++ b/unsloth/chat_templates.py @@ -0,0 +1,6 @@ +def get_chat_template(mapping): + assistant_value = mapping.get("assistant", "default_assistant_value") + return ( + "some_template" + .replace("'assistant'", "'" + assistant_value + "'") + )