@@ -11,7 +11,7 @@ def test_calc_finish_reason_tool_calls(self):
11
11
engine_client = Mock ()
12
12
engine_client .reasoning_parser = "ernie_x1"
13
13
# 创建一个OpenAIServingCompletion实例
14
- serving_completion = OpenAIServingCompletion (engine_client , "pid" , "ips" )
14
+ serving_completion = OpenAIServingCompletion (engine_client , "pid" , "ips" , 360 )
15
15
# 创建一个模拟的output,并设置finish_reason为"tool_calls"
16
16
output = {"finish_reason" : "tool_calls" }
17
17
# 调用calc_finish_reason方法
@@ -24,7 +24,7 @@ def test_calc_finish_reason_stop(self):
24
24
engine_client = Mock ()
25
25
engine_client .reasoning_parser = "ernie_x1"
26
26
# 创建一个OpenAIServingCompletion实例
27
- serving_completion = OpenAIServingCompletion (engine_client , "pid" , "ips" )
27
+ serving_completion = OpenAIServingCompletion (engine_client , "pid" , "ips" , 360 )
28
28
# 创建一个模拟的output,并设置finish_reason为其他值
29
29
output = {"finish_reason" : "other_reason" }
30
30
# 调用calc_finish_reason方法
@@ -36,7 +36,7 @@ def test_calc_finish_reason_length(self):
36
36
# 创建一个模拟的engine_client
37
37
engine_client = Mock ()
38
38
# 创建一个OpenAIServingCompletion实例
39
- serving_completion = OpenAIServingCompletion (engine_client , "pid" , "ips" )
39
+ serving_completion = OpenAIServingCompletion (engine_client , "pid" , "ips" , 360 )
40
40
# 创建一个模拟的output
41
41
output = {}
42
42
# 调用calc_finish_reason方法
0 commit comments