File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -2459,7 +2459,7 @@ def base_function_calling(
2459
2459
)
2460
2460
2461
2461
follow_up_gbnf_tool_grammar = (
2462
- f"""root ::= functions | "</done> "\n """
2462
+ f"""root ::= functions | "{ end_token } "\n """
2463
2463
f"""functions ::= { function_names } \n """
2464
2464
)
2465
2465
@@ -2600,7 +2600,7 @@ def base_function_calling(
2600
2600
2601
2601
response = cast (llama_types .CreateCompletionResponse , response )
2602
2602
print (response ["choices" ][0 ])
2603
- if response ["choices" ][0 ]["text" ] == "</done>" :
2603
+ if end_token in response ["choices" ][0 ]["text" ]:
2604
2604
break
2605
2605
tool_name = response ["choices" ][0 ]["text" ][len ("functions." ) :].replace (":" , "" )
2606
2606
tool = next (
@@ -2815,7 +2815,6 @@ def vicuna_function_calling(
2815
2815
'\n { "arg1": "value1", "arg2": "value2" };'
2816
2816
"\n functions.<another_function_name>:"
2817
2817
'\n { "arg1": "value3", "arg2": "value4" }'
2818
- "\n \n When you are done with the function calls, end the message with </done>."
2819
2818
"\n \n To respond with a message begin the message with 'message:', use the following format:"
2820
2819
"\n \n message:"
2821
2820
"\n <message> </s>"
You can’t perform that action at this time.
0 commit comments