You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: include/llama.h
+9-5Lines changed: 9 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -963,6 +963,10 @@ extern "C" {
963
963
bool remove_special,
964
964
bool unparse_special);
965
965
966
+
//
967
+
// Chat templates
968
+
//
969
+
966
970
/// Apply chat template. Inspired by hf apply_chat_template() on python.
967
971
/// Both "model" and "custom_template" are optional, but at least one is required. "custom_template" has higher precedence than "model"
968
972
/// NOTE: This function does not use a jinja parser. It only support a pre-defined list of template. See more: https://github.com/ggerganov/llama.cpp/wiki/Templates-supported-by-llama_chat_apply_template
@@ -1003,19 +1007,19 @@ extern "C" {
1003
1007
1004
1008
/// @details Apply constraints from grammar
1005
1009
LLAMA_API voidllama_grammar_sample(
1006
-
structllama_context * ctx,
1007
-
llama_token_data_array * candidates,
1008
-
conststructllama_grammar * grammar);
1009
-
LLAMA_API DEPRECATED(boolllama_sample_grammar(
1010
+
conststructllama_grammar * grammar,
1011
+
conststructllama_context * ctx,
1012
+
llama_token_data_array * candidates);
1013
+
LLAMA_API DEPRECATED(voidllama_sample_grammar(
1010
1014
structllama_context * ctx,
1011
1015
llama_token_data_array * candidates,
1012
1016
conststructllama_grammar * grammar),
1013
1017
"use llama_grammar_sample instead");
1014
1018
1015
1019
/// @details Accepts the sampled token into the grammar
0 commit comments