Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions test/srt/run_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class TestFile:
TestFile("test_fa3.py", 376),
TestFile("test_fim_completion.py", 40),
TestFile("test_fp8_kernel.py", 8),
TestFile("test_function_calling.py", 35),
TestFile("test_fused_moe.py", 30),
TestFile("test_hicache.py", 116),
TestFile("test_hicache_mla.py", 254),
Expand Down
11 changes: 6 additions & 5 deletions test/srt/test_function_calling.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,17 @@ def test_function_calling_streaming_args_parsing(self):
"type": "object",
"properties": {
"a": {
"type": "int",
"type": "integer",
"description": "First integer",
},
"b": {
"type": "int",
"type": "integer",
"description": "Second integer",
},
},
"required": ["a", "b"],
},
"strict": True, # Llama-3.2-1B is flaky in tool call. It won't always respond with parameters unless we set strict.
},
}
]
Expand All @@ -218,7 +219,7 @@ def test_function_calling_streaming_args_parsing(self):
# Record the function name on first occurrence
function_name = tool_call.function.name or function_name
# In case of multiple chunks, JSON fragments may need to be concatenated
if tool_call.function.arguments:
if tool_call.function.arguments is not None:
argument_fragments.append(tool_call.function.arguments)

self.assertEqual(function_name, "add", "Function name should be 'add'")
Expand Down Expand Up @@ -258,11 +259,11 @@ def test_function_call_strict(self):
"type": "object",
"properties": {
"int_a": {
"type": "int",
"type": "integer",
"description": "First integer",
},
"int_b": {
"type": "int",
"type": "integer",
"description": "Second integer",
},
},
Expand Down
Loading