Skip to content

Commit e3ed7e9

Browse files
committed
vicuna
1 parent 1ad8acb commit e3ed7e9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

llama_cpp/llama_chat_format.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2830,6 +2830,7 @@ def vicuna_function_calling(
28302830
"\n\nmessage:"
28312831
"\n<message> </s>"
28322832
"{% endif %}"
2833+
"\nAfter performing a function call, the function will send a response containing the return values of the function calls between <tool_output> tags. Present it to the user.\n"
28332834
"</s>\n"
28342835
"{% endif %}"
28352836
# User message
@@ -2860,7 +2861,7 @@ def vicuna_function_calling(
28602861
# Tool message (treated as Assistant response)
28612862
"{% if message.role == 'tool' %}"
28622863
"ASSISTANT:\n"
2863-
"Function response: {{ message.content | default('No response available') }}"
2864+
"<tool_output>: {{ message.content | default('No response available') }} </tool_output>"
28642865
"</s>\n"
28652866
"{% endif %}"
28662867
"{% endfor %}"
@@ -2927,15 +2928,14 @@ def llama3_function_calling(
29272928
'\n{ "arg1": "value1", "arg2": "value2" }'
29282929
"\nWhen you have completed entering function calls, end your output with '</done>'."
29292930
'\nStart your output with either "message:" or "functions.". Do not mix the two.'
2930-
"\nAfter 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"
2932-
"Example: <tool_output> item: Cheeseburguer, price: 12 </tool_output> You should output: I found a Cheeseburguer that costs 12 dollars."
2931+
"\nAfter performing a function call, the function will send a response containing the return values of the function calls between <tool_output> tags. Present it to the user.\n"
2932+
#"Example: <tool_output> item: Cheeseburguer, price: 12 </tool_output> You should output: I found a Cheeseburguer that costs 12 dollars."
29332933
"{% endif %}"
29342934
"<|eot_id|>\n"
29352935
"{% for message in messages %}"
29362936
"{% if message.role == 'tool'%}"
29372937
"<|start_header_id|>user<|end_header_id|>\n\n"
2938-
"Function output, bring it to me: <tool_output> {{ message.content | default('No response available') }} </tool_output>"
2938+
"<tool_output> {{ message.content | default('No response available') }} </tool_output>"
29392939
"<|eot_id|>\n"
29402940
"{% elif message.role == 'assistant' and message.function_call is defined%}"
29412941
"<|start_header_id|>{{ message.role }}<|end_header_id|>\n\n"

0 commit comments

Comments
 (0)