File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
examples/server/tests/unit Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -242,16 +242,11 @@ def test_chat_completion_with_timings_per_token():
242242 "stream" : True ,
243243 "timings_per_token" : True ,
244244 })
245- found_timings = False
246245 for data in res :
247- if "timings" in data :
248- found_timings = True
249- assert "prompt_per_second" in data ["timings" ]
250- assert "predicted_per_second" in data ["timings" ]
251- assert "predicted_n" in data ["timings" ]
252- assert data ["timings" ]["predicted_n" ] <= 10
253-
254- assert found_timings , "Expected timings in response chunks"
246+ assert "prompt_per_second" in data ["timings" ]
247+ assert "predicted_per_second" in data ["timings" ]
248+ assert "predicted_n" in data ["timings" ]
249+ assert data ["timings" ]["predicted_n" ] <= 10
255250
256251
257252def test_logprobs ():
You can’t perform that action at this time.
0 commit comments