File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
vllm/entrypoints/openai/tool_parsers Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -226,12 +226,12 @@ def extract_tool_calls_streaming(
226
226
match_name = self .tool_call_first_attribute_name .match (raw_current_tool_call )
227
227
match_arguments = self .tool_call_first_attribute_arguments .match (raw_current_tool_call )
228
228
if not self .current_tool_name_finished and match_name :
229
- if self . previous_attribute_end_index is not None and match_name .end () <= self .previous_attribute_end_index :
229
+ if match_name .end () <= self .previous_attribute_end_index :
230
230
return self ._none_or_additional_content (additional_content )
231
231
self .current_element_streaming = "name"
232
232
self .current_attribute_start_index = match_name .end ()
233
233
elif not self .current_tool_arguments_finished and match_arguments :
234
- if self . previous_attribute_end_index is not None and match_arguments .end () <= self .previous_attribute_end_index :
234
+ if match_arguments .end () <= self .previous_attribute_end_index :
235
235
return self ._none_or_additional_content (additional_content )
236
236
self .current_element_streaming = "arguments"
237
237
self .current_attribute_start_index = match_arguments .end () - 1 # the `{` is the last IN the match part. We want it as the start index element
You can’t perform that action at this time.
0 commit comments