Skip to content

Commit 9937acb

Browse files
committed
fix Qwen3.5 chat template bugs
1 parent 24f2562 commit 9937acb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

llama_cpp/llama_chat_format.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5001,7 +5001,7 @@ class Qwen35ChatHandler(MTMDChatHandler):
50015001
" {{- '<|im_start|>' + message.role + '\n' + content -}}"
50025002
" {%- endif -%}"
50035003
" {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping -%}"
5004-
" {%- for tool_call in message.tool_call -%}"
5004+
" {%- for tool_call in message.tool_calls -%}"
50055005
" {%- if tool_call.function is defined -%}"
50065006
" {%- set tool_call = tool_call.function -%}"
50075007
" {%- endif -%}"
@@ -5016,7 +5016,7 @@ class Qwen35ChatHandler(MTMDChatHandler):
50165016
" {%- endif -%}"
50175017
" {%- if tool_call.arguments is defined -%}"
50185018
" {%- for (args_name, args_value) in tool_calls.arguments | items -%}"
5019-
" {{- '<parameter=' + args.name + '>\n' -}}"
5019+
" {{- '<parameter=' + args_name + '>\n' -}}"
50205020
" {%- 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 -%}"
50215021
" {{- args_value -}}"
50225022
" {{- '\n</parameter>' -}}"

0 commit comments

Comments
 (0)