@@ -1446,33 +1446,6 @@ static void test_template_output_parsers() {
1446
1446
assert_equals (COMMON_CHAT_FORMAT_GPT_OSS, common_chat_templates_apply (tmpls.get (), inputs_no_tools).format );
1447
1447
assert_equals (COMMON_CHAT_FORMAT_GPT_OSS, common_chat_templates_apply (tmpls.get (), inputs_tools).format );
1448
1448
1449
- assert_msg_equals (message_assist_empty,
1450
- common_chat_parse (
1451
- " <|channel|>" ,
1452
- /* is_partial= */ true ,
1453
- {
1454
- /* .format = */ COMMON_CHAT_FORMAT_GPT_OSS,
1455
- /* .reasoning_format = */ COMMON_REASONING_FORMAT_AUTO,
1456
- }));
1457
-
1458
- assert_msg_equals (message_assist_empty,
1459
- common_chat_parse (
1460
- " <|channel|>analysis" ,
1461
- /* is_partial= */ true ,
1462
- {
1463
- /* .format = */ COMMON_CHAT_FORMAT_GPT_OSS,
1464
- /* .reasoning_format = */ COMMON_REASONING_FORMAT_AUTO,
1465
- }));
1466
-
1467
- assert_msg_equals (message_assist_empty,
1468
- common_chat_parse (
1469
- " <|channel|>analysis<|message|>" ,
1470
- /* is_partial= */ true ,
1471
- {
1472
- /* .format = */ COMMON_CHAT_FORMAT_GPT_OSS,
1473
- /* .reasoning_format = */ COMMON_REASONING_FORMAT_AUTO,
1474
- }));
1475
-
1476
1449
assert_msg_equals (simple_assist_msg (" " , " I'm\n think" ),
1477
1450
common_chat_parse (
1478
1451
" <|channel|>analysis<|message|>I'm\n think" ,
@@ -1489,69 +1462,6 @@ static void test_template_output_parsers() {
1489
1462
/* .format = */ COMMON_CHAT_FORMAT_GPT_OSS,
1490
1463
/* .reasoning_format = */ COMMON_REASONING_FORMAT_AUTO,
1491
1464
}));
1492
- assert_msg_equals (simple_assist_msg (" " , " I'm\n thinking" ),
1493
- common_chat_parse (
1494
- " <|channel|>analysis<|message|>I'm\n thinking<|end|>"
1495
- " <|start|>" ,
1496
- /* is_partial= */ true ,
1497
- {
1498
- /* .format = */ COMMON_CHAT_FORMAT_GPT_OSS,
1499
- /* .reasoning_format = */ COMMON_REASONING_FORMAT_AUTO,
1500
- }));
1501
- assert_msg_equals (simple_assist_msg (" " , " I'm\n thinking" ),
1502
- common_chat_parse (
1503
- " <|channel|>analysis<|message|>I'm\n thinking<|end|>"
1504
- " <|start|>assistant" ,
1505
- /* is_partial= */ true ,
1506
- {
1507
- /* .format = */ COMMON_CHAT_FORMAT_GPT_OSS,
1508
- /* .reasoning_format = */ COMMON_REASONING_FORMAT_AUTO,
1509
- }));
1510
- assert_msg_equals (simple_assist_msg (" " , " I'm\n thinking" ),
1511
- common_chat_parse (
1512
- " <|channel|>analysis<|message|>I'm\n thinking<|end|>"
1513
- " <|start|>assistant<|channel|>" ,
1514
- /* is_partial= */ true ,
1515
- {
1516
- /* .format = */ COMMON_CHAT_FORMAT_GPT_OSS,
1517
- /* .reasoning_format = */ COMMON_REASONING_FORMAT_AUTO,
1518
- }));
1519
- assert_msg_equals (simple_assist_msg (" " , " I'm\n thinking" ),
1520
- common_chat_parse (
1521
- " <|channel|>analysis<|message|>I'm\n thinking<|end|>"
1522
- " <|start|>assistant<|channel|>final" ,
1523
- /* is_partial= */ true ,
1524
- {
1525
- /* .format = */ COMMON_CHAT_FORMAT_GPT_OSS,
1526
- /* .reasoning_format = */ COMMON_REASONING_FORMAT_AUTO,
1527
- }));
1528
- assert_msg_equals (simple_assist_msg (" " , " I'm\n thinking" ),
1529
- common_chat_parse (
1530
- " <|channel|>analysis<|message|>I'm\n thinking<|end|>"
1531
- " <|start|>assistant<|channel|>final<|message|>" ,
1532
- /* is_partial= */ true ,
1533
- {
1534
- /* .format = */ COMMON_CHAT_FORMAT_GPT_OSS,
1535
- /* .reasoning_format = */ COMMON_REASONING_FORMAT_AUTO,
1536
- }));
1537
- assert_msg_equals (simple_assist_msg (" Hello" , " I'm\n thinking" ),
1538
- common_chat_parse (
1539
- " <|channel|>analysis<|message|>I'm\n thinking<|end|>"
1540
- " <|start|>assistant<|channel|>final<|message|>Hello" ,
1541
- /* is_partial= */ true ,
1542
- {
1543
- /* .format = */ COMMON_CHAT_FORMAT_GPT_OSS,
1544
- /* .reasoning_format = */ COMMON_REASONING_FORMAT_AUTO,
1545
- }));
1546
- assert_msg_equals (simple_assist_msg (" Hello, world!\n What's up?" , " I'm\n thinking" ),
1547
- common_chat_parse (
1548
- " <|channel|>analysis<|message|>I'm\n thinking<|end|>"
1549
- " <|start|>assistant<|channel|>final<|message|>Hello, world!\n What's up?" ,
1550
- /* is_partial= */ true ,
1551
- {
1552
- /* .format = */ COMMON_CHAT_FORMAT_GPT_OSS,
1553
- /* .reasoning_format = */ COMMON_REASONING_FORMAT_AUTO,
1554
- }));
1555
1465
assert_msg_equals (simple_assist_msg (" Hello, world!\n What's up?" , " I'm\n thinking" ),
1556
1466
common_chat_parse (
1557
1467
" <|channel|>analysis<|message|>I'm\n thinking<|end|>"
@@ -1561,51 +1471,6 @@ static void test_template_output_parsers() {
1561
1471
/* .format = */ COMMON_CHAT_FORMAT_GPT_OSS,
1562
1472
/* .reasoning_format = */ COMMON_REASONING_FORMAT_AUTO,
1563
1473
}));
1564
- assert_msg_equals (simple_assist_msg (" " , " I'm\n thinking" ),
1565
- common_chat_parse (
1566
- " <|channel|>analysis<|message|>I'm\n thinking<|end|>"
1567
- " <|start|>" ,
1568
- /* is_partial= */ true ,
1569
- {
1570
- /* .format = */ COMMON_CHAT_FORMAT_GPT_OSS,
1571
- /* .reasoning_format = */ COMMON_REASONING_FORMAT_AUTO,
1572
- }));
1573
- assert_msg_equals (simple_assist_msg (" " , " I'm\n thinking" ),
1574
- common_chat_parse (
1575
- " <|channel|>analysis<|message|>I'm\n thinking<|end|>"
1576
- " <|start|>assistant" ,
1577
- /* is_partial= */ true ,
1578
- {
1579
- /* .format = */ COMMON_CHAT_FORMAT_GPT_OSS,
1580
- /* .reasoning_format = */ COMMON_REASONING_FORMAT_AUTO,
1581
- }));
1582
- assert_msg_equals (simple_assist_msg (" " , " I'm\n thinking" ),
1583
- common_chat_parse (
1584
- " <|channel|>analysis<|message|>I'm\n thinking<|end|>"
1585
- " <|start|>assistant<|channel|>" ,
1586
- /* is_partial= */ true ,
1587
- {
1588
- /* .format = */ COMMON_CHAT_FORMAT_GPT_OSS,
1589
- /* .reasoning_format = */ COMMON_REASONING_FORMAT_AUTO,
1590
- }));
1591
- assert_msg_equals (simple_assist_msg (" " , " I'm\n thinking" ),
1592
- common_chat_parse (
1593
- " <|channel|>analysis<|message|>I'm\n thinking<|end|>"
1594
- " <|start|>assistant<|channel|>commentary" ,
1595
- /* is_partial= */ true ,
1596
- {
1597
- /* .format = */ COMMON_CHAT_FORMAT_GPT_OSS,
1598
- /* .reasoning_format = */ COMMON_REASONING_FORMAT_AUTO,
1599
- }));
1600
- assert_msg_equals (simple_assist_msg (" " , " I'm\n thinking" ),
1601
- common_chat_parse (
1602
- " <|channel|>analysis<|message|>I'm\n thinking<|end|>"
1603
- " <|start|>assistant<|channel|>commentary" ,
1604
- /* is_partial= */ true ,
1605
- {
1606
- /* .format = */ COMMON_CHAT_FORMAT_GPT_OSS,
1607
- /* .reasoning_format = */ COMMON_REASONING_FORMAT_AUTO,
1608
- }));
1609
1474
assert_msg_equals (simple_assist_msg (" " , " I'm\n thinking" , " special_function" , " {\" arg1" ),
1610
1475
common_chat_parse (
1611
1476
" <|channel|>analysis<|message|>I'm\n thinking<|end|>"
@@ -1677,9 +1542,7 @@ static void test_template_output_parsers() {
1677
1542
/* .parse_tool_calls = */ false ,
1678
1543
}));
1679
1544
assert_msg_equals (
1680
- simple_assist_msg (
1681
- " <tool_call>{\" name\" : \" special_function\" , \" arguments\" : {\" arg1" ,
1682
- " I'm\n thinking" ),
1545
+ simple_assist_msg (" " , " I'm\n thinking" ),
1683
1546
common_chat_parse (
1684
1547
" <|channel|>analysis<|message|>I'm\n thinking<|end|>"
1685
1548
" <|start|>assistant<|channel|>commentary to=functions.special_function<|message|>{\" arg1" ,
@@ -1692,9 +1555,7 @@ static void test_template_output_parsers() {
1692
1555
/* .parse_tool_calls = */ false ,
1693
1556
}));
1694
1557
assert_msg_equals (
1695
- simple_assist_msg (
1696
- " <tool_call>{\" name\" : \" special_function\" , \" arguments\" : {\" arg1\" :1}}</tool_call>" ,
1697
- " I'm\n thinking" ),
1558
+ simple_assist_msg (" " , " I'm\n thinking" ),
1698
1559
common_chat_parse (
1699
1560
" <|channel|>analysis<|message|>I'm\n thinking<|end|>"
1700
1561
" <|start|>assistant<|channel|>commentary to=functions.special_function <|constrain|>json<|message|>{\" arg1\" : 1}" ,
0 commit comments