We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9dc010e commit 765dca6Copy full SHA for 765dca6
1 file changed
llama_cpp/llama_chat_format.py
@@ -4294,11 +4294,11 @@ def gguf_function_calling(
4294
)
4295
# Decide initial grammar: message only, functions only, or message+functions
4296
initial_gbnf_tool_grammar = """
4297
- root ::= message | function_calls | message_then_functions
4298
- message ::= "message:"
4299
- function_calls ::= "<function_calls>\n"
4300
- message_then_functions ::= "message:" "<function_calls>\n"
4301
- """
+ root ::= message | function_calls | message_then_functions
+ message ::= "message:"
+ function_calls ::= "<function_calls>\\n"
+ message_then_functions ::= "message:" "<function_calls>\\n"
+ """
4302
completion = cast(
4303
llama_types.CreateCompletionResponse,
4304
llama.create_completion(
0 commit comments