chat : add Granite 4.1 chat template (#23518)

This commit is contained in:
Jesus Talavera 2026-05-28 13:13:33 +02:00 committed by GitHub
parent 7c48fb81ce
commit bb771cbd2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 159 additions and 1 deletions

View file

@ -2914,6 +2914,21 @@ static void test_template_output_peg_parsers(bool detailed_debug) {
.run();
}
{
// IBM Granite 4.1 (same format as 4.0)
auto tst = peg_tester("models/templates/ibm-granite-granite-4.1.jinja", detailed_debug);
tst.test("Hello, world!\nWhat's up?").expect(message_assist).run();
tst.test(
"<tool_call>\n"
"{\"name\": \"special_function\", \"arguments\": {\"arg1\": 1}}\n"
"</tool_call>")
.tools({ special_function_tool })
.expect(message_assist_call)
.run();
}
{
// ByteDance-Seed-OSS (reasoning and tool calling model)
auto tst = peg_tester("models/templates/ByteDance-Seed-OSS.jinja", detailed_debug);