[Tool Parser][2/3] Use self.tools instead of request.tools in tool parsers (#38189)
Signed-off-by: sfeng33 <4florafeng@gmail.com>
This commit is contained in:
@@ -314,7 +314,7 @@ class Qwen3CoderToolParser(ToolParser):
|
||||
)
|
||||
|
||||
tool_calls = [
|
||||
self._parse_xml_function_call(function_call_str, request.tools)
|
||||
self._parse_xml_function_call(function_call_str, self.tools)
|
||||
for function_call_str in function_calls
|
||||
]
|
||||
# Populate prev_tool_call_arr for serving layer to set finish_reason
|
||||
@@ -607,7 +607,7 @@ class Qwen3CoderToolParser(ToolParser):
|
||||
|
||||
param_config = self._get_arguments_config(
|
||||
self.current_function_name or "",
|
||||
self.streaming_request.tools if self.streaming_request else None,
|
||||
self.tools,
|
||||
)
|
||||
|
||||
converted_value = self._convert_param_value(
|
||||
@@ -666,9 +666,7 @@ class Qwen3CoderToolParser(ToolParser):
|
||||
try:
|
||||
parsed_tool = self._parse_xml_function_call(
|
||||
func_content,
|
||||
self.streaming_request.tools
|
||||
if self.streaming_request
|
||||
else None,
|
||||
self.tools,
|
||||
)
|
||||
if parsed_tool and self.current_tool_index < len(
|
||||
self.prev_tool_call_arr
|
||||
|
||||
Reference in New Issue
Block a user