From 0f8af536c9837a18104da40a14f02b617f13328f Mon Sep 17 00:00:00 2001 From: ochafik Date: Wed, 29 Jan 2025 17:50:44 +0000 Subject: [PATCH] nits --- scripts/get_chat_template.py | 1 - tests/test-chat-handler.cpp | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/get_chat_template.py b/scripts/get_chat_template.py index fbea9c927..e8982d11a 100644 --- a/scripts/get_chat_template.py +++ b/scripts/get_chat_template.py @@ -75,4 +75,3 @@ def main(args): if __name__ == '__main__': main(sys.argv[1:]) - diff --git a/tests/test-chat-handler.cpp b/tests/test-chat-handler.cpp index c638105f6..6ea595c3a 100644 --- a/tests/test-chat-handler.cpp +++ b/tests/test-chat-handler.cpp @@ -357,7 +357,7 @@ static void test_template_output_parsers() { assert_equals(std::string("hermes 2 pro tool calls"), describe(tmpl, tools_params)); assert_equals(std::string("hermes 2 pro tool calls"), describe(common_chat_template(read_file("tests/chat/templates/NousResearch-Hermes-3-Llama-3.1-8B-tool_use.jinja"), "", ""), tools_params)); assert_equals(std::string("hermes 2 pro tool calls"), describe(common_chat_template(read_file("tests/chat/templates/Qwen-Qwen2.5-7B-Instruct.jinja"), "", ""), tools_params)); - + test_template(tmpl, end_tokens, text_message, tools, "Hello, world!", /* skip_grammar_test= */ true); test_template(tmpl, end_tokens, tool_call_message, tools, "\n" @@ -435,7 +435,7 @@ static void test_template_output_parsers() { std::vector end_tokens { "<|end▁of▁sentence|>" }; assert_equals(std::string("deepseek r1 tool calls"), describe(tmpl, tools_params)); - + test_template(tmpl, end_tokens, text_message, tools, "Hello, world!", /* skip_grammar_test= */ true); test_template(tmpl, end_tokens, tool_call_message, tools,