diff --git a/llama_cpp/llama_chat_format.py b/llama_cpp/llama_chat_format.py index bceccb186..994a3dca0 100644 --- a/llama_cpp/llama_chat_format.py +++ b/llama_cpp/llama_chat_format.py @@ -5001,7 +5001,7 @@ class Qwen35ChatHandler(MTMDChatHandler): " {{- '<|im_start|>' + message.role + '\n' + content -}}" " {%- endif -%}" " {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping -%}" - " {%- for tool_call in message.tool_call -%}" + " {%- for tool_call in message.tool_calls -%}" " {%- if tool_call.function is defined -%}" " {%- set tool_call = tool_call.function -%}" " {%- endif -%}" @@ -5016,7 +5016,7 @@ class Qwen35ChatHandler(MTMDChatHandler): " {%- endif -%}" " {%- if tool_call.arguments is defined -%}" " {%- for (args_name, args_value) in tool_calls.arguments | items -%}" - " {{- '\n' -}}" + " {{- '\n' -}}" " {%- set args_value = args_value | tojson | safe if args_value is mapping or args_value is sequence and args_value is not string else args_value | string -%}" " {{- args_value -}}" " {{- '\n' -}}"