@@ -2927,22 +2927,22 @@ def llama3_function_calling(
2927
2927
'\n { "arg1": "value1", "arg2": "value2" }'
2928
2928
"\n When you have completed entering function calls, end your output with '</done>'."
2929
2929
'\n Start your output with either "message:" or "functions.". Do not mix the two.'
2930
- '\n In any hypothesis you should output: message: function_name: arguments never do that'
2931
- "\n When you encounter a <tool_output> tag from a user message, it indicates the output from a previously executed function."
2932
- "Please present this output in an easy-to-understand format, as the user has not seen it directly.\n "
2930
+ "\n After performing a function call, the user will send a response containing the return values of the function calls between <tool_output> tags."
2931
+ "Always present this output back to the user, as the user has not seen it directly.\n "
2933
2932
"Example: <tool_output> item: Cheeseburguer, price: 12 </tool_output> You should output: I found a Cheeseburguer that costs 12 dollars."
2934
2933
"{% endif %}"
2934
+ "<|eot_id|>\n "
2935
2935
"{% for message in messages %}"
2936
- "{% if message.role == 'tool' %}"
2936
+ "{% if message.role == 'tool'%}"
2937
2937
"<|start_header_id|>user<|end_header_id|>\n \n "
2938
- "<tool_output> {{ message.content | default('No response available') }} </tool_output>"
2938
+ "Function output, bring it to me: <tool_output> {{ message.content | default('No response available') }} </tool_output>"
2939
2939
"<|eot_id|>\n "
2940
2940
"{% elif message.role == 'assistant' and message.function_call is defined%}"
2941
2941
"<|start_header_id|>{{ message.role }}<|end_header_id|>\n \n "
2942
2942
"Function called: {{ message.function_call.name | default('No name') }}\n "
2943
2943
"Function argument: {{ message.function_call.arguments | default('No arguments') }}"
2944
2944
"<|eot_id|>\n "
2945
- "{% else %}"
2945
+ "{% elif message.role != 'system' %}"
2946
2946
"<|start_header_id|>{{ message.role }}<|end_header_id|>\n \n "
2947
2947
"{{ message.content }}"
2948
2948
"<|eot_id|>\n "
0 commit comments