We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6fe8b42 commit 4b0e332Copy full SHA for 4b0e332
llama_cpp/llama_chat_format.py
@@ -2072,12 +2072,14 @@ def chatml_function_calling(
2072
"{% if message.role == 'assistant' %}"
2073
## Reglar message
2074
"{% if message.content and message.content | length > 0 %}"
2075
+ "{% if tool_calls %}"
2076
"message:\n"
2077
+ "{% endif %}"
2078
"{{ message.content }}"
2079
"\n<|im_end|>\n"
2080
"{% endif %}"
2081
## Function calls
- "{% if message.tool_calls %}"
2082
+ "{% if 'tool_calls' in message %}"
2083
"{% for tool_call in message.tool_calls %}"
2084
"functions.{{ tool_call.function.name }}:\n"
2085
"{{ tool_call.function.arguments }}"
0 commit comments