Skip to content

Commit 6b23d05

Browse files
committed
improve gguf-function-calling parser
1 parent 765dca6 commit 6b23d05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llama_cpp/llama_chat_format.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4296,8 +4296,8 @@ def gguf_function_calling(
42964296
initial_gbnf_tool_grammar = """
42974297
root ::= message | function_calls | message_then_functions
42984298
message ::= "message:"
4299-
function_calls ::= "<function_calls>\\n"
4300-
message_then_functions ::= "message:" "<function_calls>\\n"
4299+
function_calls ::= "<function_calls>"
4300+
message_then_functions ::= "message:" "<function_calls>"
43014301
"""
43024302
completion = cast(
43034303
llama_types.CreateCompletionResponse,

0 commit comments

Comments
 (0)