Skip to content

Commit 379b652

Browse files
committed
gpt-oss : add template tests
1 parent 806446e commit 379b652

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test-chat.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1441,7 +1441,10 @@ static void test_template_output_parsers() {
14411441
}
14421442
{
14431443
auto tmpls = read_templates("models/templates/openai-gpt-oss-120b.jinja");
1444-
std::vector<std::string> end_tokens{ "<|return|>" };
1444+
std::vector<std::string> end_tokens{ "<|return|>", "<|call|>" };
1445+
1446+
assert_equals(COMMON_CHAT_FORMAT_GPT_OSS, common_chat_templates_apply(tmpls.get(), inputs_no_tools).format);
1447+
assert_equals(COMMON_CHAT_FORMAT_GPT_OSS, common_chat_templates_apply(tmpls.get(), inputs_tools).format);
14451448

14461449
assert_msg_equals(message_assist_empty,
14471450
common_chat_parse(

0 commit comments

Comments
 (0)