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
@@ -962,6 +962,10 @@ extern "C" {
962
962
bool remove_special,
963
963
bool unparse_special);
964
964
965
+
//
966
+
// Chat templates
967
+
//
968
+
965
969
/// Apply chat template. Inspired by hf apply_chat_template() on python.
966
970
/// Both "model" and "custom_template" are optional, but at least one is required. "custom_template" has higher precedence than "model"
967
971
/// 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
@@ -1002,19 +1006,19 @@ extern "C" {
1002
1006
1003
1007
/// @details Apply constraints from grammar
1004
1008
LLAMA_API voidllama_grammar_sample(
1005
-
structllama_context * ctx,
1006
-
llama_token_data_array * candidates,
1007
-
conststructllama_grammar * grammar);
1008
-
LLAMA_API DEPRECATED(boolllama_sample_grammar(
1009
+
conststructllama_grammar * grammar,
1010
+
conststructllama_context * ctx,
1011
+
llama_token_data_array * candidates);
1012
+
LLAMA_API DEPRECATED(voidllama_sample_grammar(
1009
1013
structllama_context * ctx,
1010
1014
llama_token_data_array * candidates,
1011
1015
conststructllama_grammar * grammar),
1012
1016
"use llama_grammar_sample instead");
1013
1017
1014
1018
/// @details Accepts the sampled token into the grammar
0 commit comments