File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed
Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -4295,17 +4295,12 @@ def gguf_function_calling(
42954295 )
42964296 initial_gbnf_tool_grammar = (
42974297 (
4298- 'root ::= message_only | message_with_functions | functions_only\n '
4299- 'message_only ::= "message:" ws text\n '
4300- 'message_with_functions ::= "message:" ws text ws "<function_calls>" nl functions\n '
4301- 'functions_only ::= "<function_calls>" nl functions\n '
4298+ 'root ::= "<function_calls>" "\\ n" functions | "message:" text | "message:" text "<function_calls>" "\\ n" functions\n '
43024299 'text ::= [^<]+\n '
4303- 'ws ::= [ \t \n ]*\n '
4304- 'nl ::= "\\ n"\n '
43054300 f"functions ::= { function_names } \n "
43064301 )
43074302 if tool_choice == "auto"
4308- else f'root ::= "<function_calls>" nl functions\n functions ::= { function_names } \n '
4303+ else f'root ::= "<function_calls>" " \\ n" functions\n functions ::= { function_names } \n '
43094304 )
43104305 completion = cast (
43114306 llama_types .CreateCompletionResponse ,
You can’t perform that action at this time.
0 commit comments