fix(glm47): improve tool call parsing and content normalization (#37386)

Signed-off-by: karanb192 <karan@example.com>
Co-authored-by: karanb192 <karan@example.com>
This commit is contained in:
Karan Bansal
2026-03-18 13:42:21 +05:30
committed by GitHub
parent 8c31f47c63
commit fad09e8a1f
4 changed files with 193 additions and 6 deletions

View File

@@ -107,7 +107,7 @@ def test_extract_tool_calls_no_tools(glm4_moe_tool_parser, mock_request):
)
)
],
"",
None,
),
(
"""<tool_call>get_current_weather
@@ -152,7 +152,7 @@ def test_extract_tool_calls_no_tools(glm4_moe_tool_parser, mock_request):
)
),
],
"",
None,
),
(
"""I'll help you check the weather. <tool_call>get_current_weather
@@ -202,7 +202,7 @@ def test_extract_tool_calls_no_tools(glm4_moe_tool_parser, mock_request):
)
)
],
"",
None,
),
(
"""I will help you get the weather.<tool_call>get_weather