File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ class TestFile:
36
36
TestFile ("test_fa3.py" , 376 ),
37
37
TestFile ("test_fim_completion.py" , 40 ),
38
38
TestFile ("test_fp8_kernel.py" , 8 ),
39
+ TestFile ("test_function_calling.py" , 35 ),
39
40
TestFile ("test_fused_moe.py" , 30 ),
40
41
TestFile ("test_hicache.py" , 116 ),
41
42
TestFile ("test_hicache_mla.py" , 254 ),
Original file line number Diff line number Diff line change @@ -182,16 +182,17 @@ def test_function_calling_streaming_args_parsing(self):
182
182
"type" : "object" ,
183
183
"properties" : {
184
184
"a" : {
185
- "type" : "int " ,
185
+ "type" : "integer " ,
186
186
"description" : "First integer" ,
187
187
},
188
188
"b" : {
189
- "type" : "int " ,
189
+ "type" : "integer " ,
190
190
"description" : "Second integer" ,
191
191
},
192
192
},
193
193
"required" : ["a" , "b" ],
194
194
},
195
+ "strict" : True , # Llama-3.2-1B is flaky in tool call. It won't always respond with parameters unless we set strict.
195
196
},
196
197
}
197
198
]
@@ -218,7 +219,7 @@ def test_function_calling_streaming_args_parsing(self):
218
219
# Record the function name on first occurrence
219
220
function_name = tool_call .function .name or function_name
220
221
# In case of multiple chunks, JSON fragments may need to be concatenated
221
- if tool_call .function .arguments :
222
+ if tool_call .function .arguments is not None :
222
223
argument_fragments .append (tool_call .function .arguments )
223
224
224
225
self .assertEqual (function_name , "add" , "Function name should be 'add'" )
@@ -258,11 +259,11 @@ def test_function_call_strict(self):
258
259
"type" : "object" ,
259
260
"properties" : {
260
261
"int_a" : {
261
- "type" : "int " ,
262
+ "type" : "integer " ,
262
263
"description" : "First integer" ,
263
264
},
264
265
"int_b" : {
265
- "type" : "int " ,
266
+ "type" : "integer " ,
266
267
"description" : "Second integer" ,
267
268
},
268
269
},
You can’t perform that action at this time.
0 commit comments